Re: Exists filter does not respect must_not bool filter

2014-09-05 Thread Ayush Sangani
Appreciate your explanation, and as per your suggestion range filter gives correct results. I am still confused with the usage of exists filter. As per my understanding the implementation of exists filter is changed in v1.3 to increase the speed but why it deviates from it's expected

Re: Exists filter does not respect must_not bool filter

2014-09-04 Thread ElasticRabbit
Hi Jorg, I was in a assumption that range filter has to be used for numeric fields. But this works thanks for the help. If anyone could enlighten me why must_not bool filter doesn't respect exists filter? Thanks, Ayush Sangani On Wednesday, September 3, 2014 5:20:54 PM UTC-4, Jörg Prante

Re: Exists filter does not respect must_not bool filter

2014-09-04 Thread joergpra...@gmail.com
Yes, range filter operates on all fields. The missing/exists operation has been slightly changed in recent versions. For high cardinality fields, operations on the field content were very expensive. So, an optimization was introduced: each doc carries a list of the field names in a hidden field,

Exists filter does not respect must_not bool filter

2014-09-03 Thread ElasticRabbit
Hi Everyone, Goal: I want to find all the documents which does not have giving.assignee field. I am executing below query on ES version 1.3.2 involving exists filter and boolean filter. { query: { filtered: { query: { match_all: {} },

Re: Exists filter does not respect must_not bool filter

2014-09-03 Thread Ivan Brusic
Is giving.assignee a sub-object or a nested document? Can you provide your mapping? Use the mapping API for exact results ( http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-mapping.html ) Perhaps enabling explain would provide some hints, -- Ivan On Wed, Sep

Re: Exists filter does not respect must_not bool filter

2014-09-03 Thread joergpra...@gmail.com
The behavior of exists/missing has slightly changed but this is unfortunately not well documented yet. Can you please try { query: { filtered: { filter: { not: { filter: { range: { giving.assignee: { } }

Re: Exists filter does not respect must_not bool filter

2014-09-03 Thread ElasticRabbit
Hi Ivan, Thanks for reply. Please find below the mapping for the giving field. { giving: { properties: { assignee: { type: string, fields: { assignee: { type: string,

Re: Exists filter does not respect must_not bool filter

2014-09-03 Thread ElasticRabbit
Hi Jorg, giving.assignee is a string field I tried your suggestion also but it didn't work. { query: { filtered: { query: { match_all: {} }, filter: { not: { filter: { exists: {