Thanks! I was thinking a bool query was something specific to fields with boolean values. Which is why I didn't understand the bool query example in the docs. Your posts helped me get what I wanted. :)
On Wednesday, January 14, 2015 at 3:34:05 PM UTC-8, Brian wrote: > > By the way, David, the full query follows: > > { > "from" : 0, > "size" : 20, > "timeout" : 60000, > "*query*" : { > "*bool*" : { > "*must*" : [ { > "match" : { > "field_a" : { > "query" : "val1", > "type" : "boolean" > } > } > }, { > "match" : { > "field_b" : { > "query" : "val2", > "type" : "boolean" > } > } > } ] > } > }, > "version" : true, > "explain" : false, > "fields" : [ "_ttl", "_source" ] > } > > Also note that since the _ttl field is being requested (always), then the > _source must also be asked for explicitly. If you don't ask for any fields, > _source is returned by default. But if you ask for one or more fields > explicitly, then you must also ask for _source or it won't be returned. > > Brian > > On Wednesday, January 14, 2015 at 6:31:29 PM UTC-5, Brian wrote: >> >> David, >> >> This is what I use. I hope it helps. >> >> { >> "*bool*" : { >> "*must*" : [ { >> "match" : { >> "field_a" : { >> "query" : "val1", >> "type" : "boolean" >> } >> } >> }, { >> "match" : { >> "field_b" : { >> "query" : "val2", >> "type" : "boolean" >> } >> } >> } ] >> } >> } >> >> Brian >> > -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/feb306b6-aa38-4eaf-a9fc-ad23be10ea4a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.