Sitecore Exact Search


Here's a step-by-step guide to implement Sitecore Search in a Sitecore XM Cloud project. Objective: Integrate Sitecore Search (SaaS product) with XM Cloud (headless CMS) to allow AI-powered search and content discovery on your headless site (e.g., React, Next.js).
Before starting:
Step 1: Log in to Sitecore Search

Configure exact-match search, optimize relevance, and help users find the right content faster across your Sitecore digital experience.
Sitecore Search uses crawlers to fetch and index your content.Option A: Web Crawler
-Base URL (e.g., https://yourwebsite.com/blog) -Include/Exclude rules 4. Define schema mapping for: -title -description -image -URL -tags / categories Option B: Feed Crawler (for headless content)
You can use one of the following methods:Option A: Prebuilt SDK Widgets
<script src="https://unpkg.com/@sitecore-search/js-sdk"></script>Example (basic search box): <sitecore-search-search-box
  api-key="your-api-key"
  environment="prod"
  placeholder="Search here..."
></sitecore-search-search-box>Use Sitecore's React SDK for better control.
1. Install SDK:
npm install @sitecore-search/react
2. Use component:
import { SearchBox } from '@sitecore-search/react';
<SearchBox
 placeholder="Search..."
 onSearch={(query) => console.log(query)}
 apiKey="your-api-key"
 environment="prod"
/>More components available:
Docs: https://doc.sitecore.com/search/en/developers/search/index.html
3. Show different results or boost certain content
Understanding Sitecore Search Letâs take a moment to remember a few concepts in Sitecore Search to understand the configuration better.
Sitecore Search has a number ofâŻpredefined analyzersâŻbuilt in. Each analyzer processes the search query in different ways. The default analyzer is the multi local standard analyzer. This analyzer modifies the search query by making it lower case, splitting the search query into single word tokens, finding the root of each word, applying synonyms, and removing punctuation. For this reason, it will not find an exact match. For that we need the keyword analyzer which leaves the search query in a single token without applying any modifications. Configure Exact Match Search â Textual Relevance In order to configure exact match search, we need to add the keyword analyzer to the textual relevance settings for the desired attribute, in this case the description. Navigate to Admin/Domain Settings then click the feature configuration tab.Domain Settings Edit the Textual Relevance section. Textual Relevance Settings Add the keyword analyzer to the description attribute. Add Analyzer Select the keyword analyser Edit the Textual Relevance section in Global resources. - Add attribute weight value in global resources->global widget settings->textual relevance Make sure to save your changes then publish your domain settings for your changes to take effect.
Happy Coding!
Sitecore Exact Search is a search configuration approach that uses exact-match analysis to help users find content matching a complete query or phrase more precisely. It can be configured by applying the Keyword analyzer to relevant searchable attributes.
Configure the relevant attribute for textual relevance, add the Keyword analyzer, enable the attribute in the global widget textual relevance settings, assign an appropriate weight, save the configuration, and publish the domain settings.
The Keyword analyzer processes the entire input as a single token. For example, a query such as 'Sitecore Search' remains a complete phrase instead of being split into individual searchable words.
The Multi Locale Standard analyzer can lowercase text, apply stemming, process synonyms, remove stop words, and remove punctuation. These transformations improve broader relevance but are not designed for strict exact-phrase matching.
Textual relevance determines which attributes Sitecore Search uses to locate potential matches and how important each configured attribute is when calculating the relevance of search results.
Attribute weights give different levels of importance to searchable attributes. A higher weight can increase the influence of a matching attribute when Sitecore Search calculates and orders relevant results.
Yes. The Keyword analyzer can be added to attributes used for textual relevance when exact-match behavior is required for a specific search field or use case.
No. Exact matching controls how search input is analyzed and matched, while textual relevance and other ranking factors help determine the importance and order of potential search results.
Yes. Sitecore Search can be integrated with XM Cloud to provide searchable and configurable content discovery experiences for headless applications, including React and Next.js front ends.
Exact match search is useful when users need precise matches for complete phrases, product identifiers, titles, codes, names, or other content where broader tokenized matching could produce irrelevant results.