How can I query or filter for one field not equal to another field? i.e. where document1.city1.name is not equal to document1.city2.name.
Some version of this? http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-script-fields.html
Yes, for this you need to use a script filter
{ "filtered": { "filter": { "script": { "script": "doc['field1'].value != doc['field2'].value" } } } }
You can find more information here.