I am trying to filter based on a field that, on some objects, does not 
exist. I was under the impression that ES would match objects that don't 
have that field.

Ultimately, I am trying to filter as such:

   - Field A will always exist, and should match on any of tags 1,2,3 
   - When it exists, either Field B or C must match any of tags 5,6,7 
   - When it exists, Field B must match any of tags 10, 11, 12 
   - When it exists, Field B or C must NOT have any of tags 15, 16, 18. 

In this case, all my tags are strings. In addition, fields B and C are 
inside of another. I am uncertain if that matters.

Essentially, my object is:

{ a: ["some", "tags", "here"],
    X : { 
        B: ["more", "tags", "here"],
        C: ["even", "more", "here"]
    }
} 


Ultimately, I am trying to build a whitelist and blacklist filtering system.

However, when filtering this way, I do not get any results that do not 
contain field X.

How do I properly format this filter? 

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/754097d9-fff7-4773-bac4-54f4fe3e5172%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to