How can I query for, or filter for, one field doesn't equal another field? i.e. where document1.city1.name not equal document1.city2.name.
Some version of this? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-script-fields.html
Yes , you will need to use script filter to achieve this
{ "bool": { "filter": { "script": { "script": "doc['field1'].value != doc['field2'].value" } } } }
You can find more information here
2.1m questions
2.1m answers
60 comments
57.0k users