Added extrargs for searching
Extra args to allow routing parameter
This commit is contained in:
parent
1492f83917
commit
d48efef610
3
goes.go
3
goes.go
@ -165,7 +165,7 @@ func (c *Connection) BulkSend(index string, documents []Document) (Response, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Search executes a search query against an index
|
// 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{
|
r := Request{
|
||||||
Conn: c,
|
Conn: c,
|
||||||
Query: query,
|
Query: query,
|
||||||
@ -173,6 +173,7 @@ func (c *Connection) Search(query map[string]interface{}, indexList []string, ty
|
|||||||
TypeList: typeList,
|
TypeList: typeList,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
api: "_search",
|
api: "_search",
|
||||||
|
ExtraArgs: extraArgs,
|
||||||
}
|
}
|
||||||
|
|
||||||
return r.Run()
|
return r.Run()
|
||||||
|
Loading…
Reference in New Issue
Block a user