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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/ee28beb0-4ee6-463d-8891-a2d158e00934%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to