I have a list of values for a handful of attributes.
For each value, I want to retrieve a single document that matches that value (if there are multiple, I only need the first one that comes up).
What is the most optimal way to do so?
I came up with these two options:
- Multisearch which is clunky because it often times out, so I have to batch my queries in groups of 10 or so…
- Doing Aggregation on each of these attributes and dumping the data, then loading it in a hashtable and do lookups.
Size of my data: ~100k documents in my index; ~1000s of values or documents to retrieve.