I'm looking for a way to perform a query similar to a MySQL WHERE IN query.
I have two indexes:
- Index A contains many documents describing a widget (size, desc, weight, price, UPC, part_num, etc)
- Index B just contains UPCs and location.
I'm MySQL If I was looking to get a result set containing all the documents from Index A that have a UPC shared with Index B I would write:
SELECT * FROM IndexA WHERE IndexA.UPC IN (SELECT IndexB.UPC FROM IndexB)
Is there a similar way to do this in ElasticSearch. I've looked into the indicies filter and script filter, but i think I may be missing something.
Thanks