Tuesday, 10 May 2016

Search strategy for Multi site in sitecore

We can do following

  • Separate core in Solr
  • New index

Another way that you can manage sites with Sitecore 7 is NOT to use a core or index per site but rather use the built-in filters to simply filter your search by site. Luckily, this is also given to you for free with Sitecore 7. We ship with a IComputedIndexField called "Site" which stores anIList<string> of site names that each IIndexable belongs to. This allows you to search with LINQ like so:
var query = context.GetQueryable<Swan>.Where(i => i.Site.Contains("Lego"));


No comments:

Post a Comment

Featured post

Getting Started With SOLR

Getting Started with Solr ·           Features o    Hit highlighting o    Auto correction o    Faceted Search o    Multi lan...