OK so that was wrong. Here's what I found: First, it looks like you can simply send a "GET _search" to the elasticsearch server with the JSON request as the body. See https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html. So maybe drop the client and just use http.Get().
Second, If you want to use that client, it looks like you can use RawStringQuery <https://godoc.org/gopkg.in/olivere/elastic.v3#RawStringQuery>. See the example in that doc. On Sat, Sep 3, 2016 at 4:21 PM Matt Harden <matt.har...@gmail.com> wrote: > Maybe you want a QueryStringQuery > <https://godoc.org/gopkg.in/olivere/elastic.v3#NewQueryStringQuery>? > > On Sat, Sep 3, 2016 at 3:21 PM David Sofo <sofodav...@gmail.com> wrote: > >> Hi, >> >> I have a set of ElasticSearch queries in string format already. I don't >> have to rewrite the queries. How to query ElasticSearch using these strings. >> A string query can have this form: >> >> query := `{ >> "query":{ >> "bool": { >> "should": [ >> {"match": {"name": "Rodri"}}, >> {"match": {"name": "Massadra"}} >> ] >> } >> } >> }` >> >> I try to use this client https://github.com/olivere/elastic but I >> didn't find a way to do it. >> >> Thank you any suggestion is welcome >> David >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "golang-nuts" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to golang-nuts+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.