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? ht
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