Reputation: 4701
I have setup a Solr server, now, I have two sites that I want to index and search using SolrNet.
How do I differentiate the two sites' content in Solr?
Upvotes: 2
Views: 1304
Reputation: 31355
Another option is you can simply add a new field that indicates the item's Web site. For example, you can add a field called type
.
Searches on website1.com would require you to filter on the type
field.
&fq=type:website1.com
That way you only need to deal with one core and one schema.xml file. This works if the pages of both sites have a very similar field set, and it will make it easier to search across both sites if you plan on doing that.
http://wiki.apache.org/solr/MultipleIndexes#Flattening_Data_Into_a_Single_Index
Upvotes: 2
Reputation: 10205
You may want to take a look at this document: http://wiki.apache.org/solr/MultipleIndexes I think the best approach is to use Multiple Solr Cores.
Upvotes: 4