I have several different entities I want to index in SOLR, for example:
- users
- products
- blogs
All are completely different in schema.
All are searched for in different places in my app.
Is there a way to do it in the same core? Is it the right approach?
Is a core the conceptual equivalence of a table in a relational DB (In which case the answer is obvious).
Really depends on how you will search this data. The main question is: What will you search for?
If you will search for products (i.e. the search results are products), then design the schema around products. If you search for products by users or blogs, model users/blogs as dynamic/multivalued fields.
If you have an app that searches for products, and another app that searches for blogs, and they’re completely unrelated, put them in separate cores.
From the Solr wiki:
So don’t blindly put everything in a single core. Carefully consider what your search scenarios are.