{"action":"created","issue":{"url":"https://api.github.com/repos/olivere/elastic/issues/66","labels_url":"https://api.github.com/repos/olivere/elastic/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/olivere/elastic/issues/66/comments","events_url":"https://api.github.com/repos/olivere/elastic/issues/66/events","html_url":"https://github.com/olivere/elastic/issues/66","id":70282686,"number":66,"title":"How to use a defined query template in our query?","user":{"login":"ishare","id":1309607,"avatar_url":"https://avatars.githubusercontent.com/u/1309607?v=3","gravatar_id":"","url":"https://api.github.com/users/ishare","html_url":"https://github.com/ishare","followers_url":"https://api.github.com/users/ishare/followers","following_url":"https://api.github.com/users/ishare/following{/other_user}","gists_url":"https://api.github.com/users/ishare/gists{/gist_id}","starred_url":"https://api.github.com/users/ishare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ishare/subscriptions","organizations_url":"https://api.github.com/users/ishare/orgs","repos_url":"https://api.github.com/users/ishare/repos","events_url":"https://api.github.com/users/ishare/events{/privacy}","received_events_url":"https://api.github.com/users/ishare/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-23T02:10:33Z","updated_at":"2015-04-23T12:19:49Z","closed_at":null,"body":"How to use a defined query template `find_user_tpl`, in our query?\r\n\r\nquery := elastic.NewTemplateQuery(\"find_user_tpl\").Var(\"query_string\", \"Lin\")\r\nparse to \"query\": \"find_user_tpl\"..\r\n"},"comment":{"url":"https://api.github.com/repos/olivere/elastic/issues/comments/95567103","html_url":"https://github.com/olivere/elastic/issues/66#issuecomment-95567103","issue_url":"https://api.github.com/repos/olivere/elastic/issues/66","id":95567103,"user":{"login":"olivere","id":134848,"avatar_url":"https://avatars.githubusercontent.com/u/134848?v=3","gravatar_id":"","url":"https://api.github.com/users/olivere","html_url":"https://github.com/olivere","followers_url":"https://api.github.com/users/olivere/followers","following_url":"https://api.github.com/users/olivere/following{/other_user}","gists_url":"https://api.github.com/users/olivere/gists{/gist_id}","starred_url":"https://api.github.com/users/olivere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olivere/subscriptions","organizations_url":"https://api.github.com/users/olivere/orgs","repos_url":"https://api.github.com/users/olivere/repos","events_url":"https://api.github.com/users/olivere/events{/privacy}","received_events_url":"https://api.github.com/users/olivere/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T12:19:49Z","updated_at":"2015-04-23T12:19:49Z","body":"You mean something like [boolean queries](https://github.com/olivere/elastic/blob/master/search_queries_bool_test.go) ([docs on elastic.co](http://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html))?\r\n\r\nIn case you missed it, [Elasticsearch - The Definite Guide](http://www.elastic.co/guide/en/elasticsearch/guide/current/index.html) is a fantastic online book for learning many of the details of Elasticsearch. Elastic, the Go client, is simply a DSL to all that, and the tests in this repository will probably help you find out about the correct syntax.\r\n\r\nHope this helps :-)\r\n"}}