I have 2 indexes in my Elasticsearch setup.
index_a
has a field location
and have about 1000 documents where as index_b
has a field city
and have about 600 documents.
I want to find out all the locations
from index_a
that are not in the city
field in index_b
. What query should I make to achieve the above ?
You perform two queries: select "all necessary info" from index_b, then perform the search on index_a using the "info" from index_b.
Elasticsearch is not able to "join" in any way two indices in a single query, and rather prefers having denormalized data, or use nested or parent-child relationships.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With