Let's say I have an index where my documents are cars.
Each car some of the following attributes: make, model, color, production year, engine type, length, number of seats, etc.
I have a list of models for a given brand.
I want to retrieve the generic information about each model so I only need to pull one document for each model.
Example: the model is a Camry. I want to know it's a sedan, 5 seats, 15 feet long, etc. I don't care about each individual camry's color, year, etc.
Here is what I thought about doing:
- Multisearch: To run many lookups but still, it is not scalable
- Match all query with a filter on Make and collapse on Model: Not compatible with paginated search and my index is too large
- Aggregate on Model, sub-aggregate on the fields I am looking for, filter by Make. Is that too computationally intensive?
Is there another option I didn't think of, or a workaround for the issues I am encountering?