Added extrargs for searching

Extra args to allow routing parameter
This commit is contained in:
r--w 2014-05-07 14:49:13 +02:00
parent 1492f83917
commit d48efef610

View File

@ -165,7 +165,7 @@ func (c *Connection) BulkSend(index string, documents []Document) (Response, err
}
// Search executes a search query against an index
func (c *Connection) Search(query map[string]interface{}, indexList []string, typeList []string) (Response, error) {
func (c *Connection) Search(query map[string]interface{}, indexList []string, typeList []string, extraArgs url.Values) (Response, error) {
r := Request{
Conn: c,
Query: query,
@ -173,6 +173,7 @@ func (c *Connection) Search(query map[string]interface{}, indexList []string, ty
TypeList: typeList,
method: "POST",
api: "_search",
ExtraArgs: extraArgs,
}
return r.Run()