What do you expect when providing an empty array, do you mean to find documents that have no values for user? We have the missing filter for it, but we could identify an empty array and automatically do a "missing" filter in that case.
On Feb 1, 2013, at 5:04 PM, Paweł Młynarczyk zwarios@gmail.com wrote:
Hello,
I've been trying out the new beta version of ES and I've got a question.
Version 0.19.x allowed us to provide an empty set of Terms for Terms Filter:
What do you expect when providing an empty array, do you mean to find documents that have no values for user? We have the missing filter for it, but we could identify an empty array and automatically do a "missing" filter in that case.
On Feb 1, 2013, at 5:04 PM, Paweł Młynarczyk zwarios@gmail.com wrote:
Hello,
I've been trying out the new beta version of ES and I've got a question.
Version 0.19.x allowed us to provide an empty set of Terms for Terms Filter:
I think that using missingFilter when termsFilter has empty terms list is
misleading.
I understand termsFilter like: return only those documents, where a field
has one of the values provided as terms.
So empty terms list in termsFilter == doesn't return anything ==
notFilter(matchAllFilter()).
Also notFilter(termsFilter with empty terms list) == matchAllFilter.
I use this behaviour of ES 0.19 to exclude some documents from results:
notFilter(termsFilter("documentType", ))
If is empty then all documents should be
returned.
On Mon, 2013-02-04 at 02:40 -0800, Wojciech Durczyński wrote:
I think that using missingFilter when termsFilter has empty terms list
is misleading.
I agree.
I understand termsFilter like: return only those documents, where a
field has one of the values provided as terms.
So empty terms list in termsFilter == doesn't return anything ==
notFilter(matchAllFilter()).
Also notFilter(termsFilter with empty terms list) == matchAllFilter.
I understand it differently. Giving that you are filtering documents, a
filter with no terms for me means: don't filter on anything, so give me
all docs, ie match_all
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.