Choosing Between One or More Indices
You can put all your records into one index or spread them across several indices.
Multiple indices are used when you have different kinds of data (movies + actors) or need different rankings for the same data (most popular or highest rated films).
It’s really a front-end UI question.
How you organize your indices corresponds to how you want to search and display your records.
More concretely, if you wanted your front end to display films and actors separately, it would be better to have separate indices.
However, if you wanted to display actors in the same results as films, and have them ranked together, then they would both need to be in the same index.
We can summarize the possibilities:
- To search and display only films, you would need only one index.
- To search and display films and actors together, or rank them together, you would need only one index.
- To search and display films and actors separately, you would need two indices (one for films, one for actors). It means that films and actors would be ranked separately.
There are other use cases for using several indices. For example, if you want to present popular queries with an autocomplete pattern like Query Suggestions, you need to have two indices: one for the common queries and another for your main content.