Hi, I have some object type like: { 'person': { 'properties': { 'age': {'index': 'no', 'type': 'long'}, 'name': {'index': 'no', 'type': 'string'} } } }
So in fact these fields are not indexed at all, they are not visible to filters. But what I want to is to be able to use 'exists' and 'missing' filters on these fields ('person', 'person.age' or 'person.name'). A simple hack is to add an indexed, boolean field for each no index field, like: { 'person': { 'properties': { 'age': {'index': 'no', 'type': 'long'}, 'age_exists': {'type': 'boolean'}, 'name': {'index': 'no', 'type': 'string'} 'name_exists': {'index': 'no', 'type': 'boolean'} } } } And modify my queries that check field existence on these boolean flag fields. This works for a few fields like this but now I have plenty of them and it also complicates my query logic. So dear elasticsearch users, is there a better solution to this? 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/67cc1526-f4a8-4c0b-aaff-a78cf23fca6c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.