I'm using ElasticSearch 5.1 and I wonder if it's possible to build query string query which will match all records where fields field_1
and field_2
are the same.
At the time of executing query I don't know what value they store. All I know is mapping which is keyword
.
So for example data:
{"id": 1, "field_1": "foo", "field_2": "foo"}
{"id": 2, "field_1": "foo", "field_2": "bar"}
when I execute such query I want to get only record with id 1 because field_1
===field_2
Thanks!