Hi All,
My understanding is that filtered executes on the results of the filter.
I'm trying to include the filtered along with the filter wrapped by
constant_score. I'm trying to understand how the query works.
My document structure
ID,List,Date : Date
{
"filtered" : {
"query" : {
"term" : { "Date" : "xxx" }
},
"query": {
"constant_score": {
"filter": {
"terms": { "DataIds": [ 61, 71], "execution": "and", "_cache":
true }
}
}
}
}
}
The above query is to get the count of documents, whose DataIDs contains
61,71 and document date is xxx and I have 50 million documents across 5
shards. I'm trying to figure out the best possible way to achieve this. I'm
using _msearch with search_type as count in the header.
-
Is the filter section broken down to 2 separate filters 61, 71 that are
executed separately and results are intersected ? Or is the filter
[61,71] executed at once meaning the iterate the data set once ? -
Help structuring the above query. I get syntax errors
-
Is filtered section parallel like filter executed on all the shards or
the results aggregated to once place and results are further filter there ?
Any help is appreciated,
Thanks.
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.