Sitecore Search and Indexing with Solr

Search in Sitecore is powered by Solr indexes behind the scenes

Fast, relevant search is expected of any large site. In Sitecore XP that’s powered by Solr, with a content-search layer that indexes items and lets you query them efficiently. Here’s the architecture and the gotchas.

Why Solr

Querying the content tree directly doesn’t scale for search. Solr maintains inverted indexes optimised for full-text and faceted queries, returning results in milliseconds across millions of items.

The Core Indexes

Index Contents
sitecore_master_index Authoring (master DB) items
sitecore_web_index Published (web DB) items
sitecore_core_index Sitecore application items

Your public site queries the web index; the Content Editor search uses the master index.

The indexing pipeline keeps Solr in sync as content changes

The Indexing Pipeline

Items flow into Solr through a configurable pipeline:

  1. Crawlers detect changed items.
  2. Computed fields add derived data (e.g., flattened taxonomy).
  3. Documents are mapped and submitted to Solr.

You query it with the Content Search API:

using (var ctx = index.CreateSearchContext()) {
  var results = ctx.GetQueryable<SearchResultItem>()
    .Where(i => i.Content.Contains("sitecore"))
    .Take(10).GetResults();
}

Performance and Relevance

  • Use computed fields to pre-compute expensive values at index time.
  • Rebuild indexes after template or data changes.
  • Tune boosting so important fields (title) outrank body text.

Most "search is broken" tickets are really "the index is stale." Automate rebuilds on deploy.

What to Learn Next

  • SolrCloud for high availability
  • Faceted search with aggregations
  • Sitecore Search (SaaS) as the composable alternative

Arivanandhan Chitheshwaran