Hello, I'm trying to filter out results after executing a nested query, but for some reason it looks like it doesn't get filtered.
I'm using the first query to return me with documents that have at least one event in the date range
that contains the product 1.
Then, from the results of that query I want to filter out the documents that contains the product 2 in any of their event...
I'm using the filter outside of the nested query because, if I understand correctly, if I add it to the nested term and there will be a single event that has only 1 (without 2) then its doc will not be filtered(it will validate the doc). So I'm using a simple filter on the result that will just filter all the docs that contain the string 2.
Is there something that I didn't consider? since in my case there's at least one doc that contains these two product Ids(in different event) and it doesn't get filtered. -> I'm getting the same result count with or without the filter.
Hello, I'm trying to filter out results after executing a nested query,
but
for some reason it looks like it doesn't get filtered.
I'm using the first query to return me with documents that have at least
one
event in the date range
that contains the product 1.
Then, from the results of that query I want to filter out the documents
that
contains the product 2 in any of their event...
I'm using the filter outside of the nested query because, if I understand
correctly, if I add it to the nested term and there will be a single event
that has only 1 (without 2) then its doc will not be filtered(it will
validate the doc). So I'm using a simple filter on the result that will
just
filter all the docs that contain the string 2.
Is there something that I didn't consider? since in my case there's at
least
one doc that contains these two product Ids(in different event) and it
doesn't get filtered. -> I'm getting the same result count with or without
the filter.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.