How do I structure Solr cores for multiple locales and content types?
I'm looking to run a Solr server to unify search across several different aspects of a public website. First of all, there are several locales (US, Ireland, Japan, etc.) and several types of content (Forums, Regular web pages, Help pages, Products, etc.)
I'd like to be able to have searches perform for a single locale, but return results for multiple content types, so that I can displa开发者_如何学Cy them as a tabbed result set.
Possible options:
- Have one core for each locale, and differentiate between content types using fields in the same index.
- Have one core for each content type.
- Have one core for each content type / locale combination.
- Single core / single index for everything.
Considerations:
The Solr wiki mentions that multi-core starts to give a performance gain at about 10 million documents, and I think we're probably well under that, even given all locales and content types. However, the solution of just smashing all the data into a single index seems a little messy and potentially difficult to shard / scale. Single core is great for getting a single result set however, as I don't have to multisearch across cores ever.
Anyone used multi-core who can advise me?
Looks like there's some interest in this question so I thought I'd start updating an answer with some of my findings.
First of all, there's some real advantages to separating cores by locale, since it makes it easy for each language to have its own stop words and settings. In my case I'm never going to be searching across locales so it's logical. Also, it's likely to give me some speed increase because the index size for each core is smaller.
As for splitting up content types by core, I'm still experimenting with one content type, so I'll update when I expand.
精彩评论