Filter constructed with Java API


(Carlos Terron) #1

I'm constructing a filter use the Java API to put in a warmer query. The filter is
{ "filtered" : { "filter" : { "and" : { "filters" : [ { "range" : { "message.timestamp_occured" : { "from" : 1452902400000, "to" : 1452988799999, "include_lower" : true, "include_upper" : true }, "_cache" : true } }, { "term" : { "message.suppressed" : "false" } } ] } } } }
Is it this filter equivalent to the next one, specially at cache level?
{
"filtered" : {
"filter" : {
"and" : {
"filters" : [ {
"range" : {
"message.timestamp_occured" : {
"gte" : 1452902400000,
"lte" : 1452988799999
},
"_cache" : true
}
}, {
"term" : {
"message.suppressed" : "false"
}
} ]
}
}
}
}

I don't know if a warmer using the second query will catch the first query.


(system) #2