Sitecore Exact Search

In This Article
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).
Prerequisites
Before starting:
- A Sitecore XM Cloud project set up
- Access to the Sitecore Search portal: https://search.sitecorecloud.io
- Your content should be published and exposed via headless (GraphQL or REST) endpoints
Step-by-Step Integration
Step 1: Log in to Sitecore Search
- Go to: https://search.sitecorecloud.io
- Log in with your Sitecore ID
- Create a new crawler for your content source

Make Every Search More Precise
Configure exact-match search, optimize relevance, and help users find the right content faster across your Sitecore digital experience.
Step 2: Configure a Web Crawler (or Feed Crawler)
Sitecore Search uses crawlers to fetch and index your content.Option A: Web Crawler
- Use this if your content is public and accessible via URLs.
- Click Create Crawler
- Choose Web Crawler
- Set:
-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)
- If you use Sitecore Headless Services, provide an endpoint that returns a list of content in JSON (e.g., blog posts from GraphQL)
Step 3: Define Schema and Facets
Build Intelligent Search That Understands User Intent
- Go to Schemas
- Map the crawled fields to Sitecore Search schema (title, content, tags, etc.)
- Set up facets (e.g., category, author) if needed
Step 4: Build Search UI (Frontend)
You can use one of the following methods:Option A: Prebuilt SDK Widgets
- Use JavaScript SDK (easy to embed)
- Add this to your frontend:
<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>Option B: React SDK / Custom UI
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:
- Search results
- Facets
- Pagination
Docs: https://doc.sitecore.com/search/en/developers/search/index.html
Step 5: Personalize Search (Optional)
- Go to Projects > Personalization
- Add custom rules for:
- Device type
- Time of day
- Campaign tags
- Location, etc.
3. Show different results or boost certain content
Exact Match Search with Sitecore Search
Understanding Sitecore Search Let’s take a moment to remember a few concepts in Sitecore Search to understand the configuration better.
- Index Document – A single piece of indexed content such as a webpage, a word document, a pdf, etc.
- Attributes – The fields of an indexed document such as title, subtitle, url, content type, etc.
- Textual Relevance – Defines the attributes used to locate potential results.
- Weight – Defines a relative value for how important an attribute is within the textual relevance.
- Analyzers – Convert the original search query into a format that is optimized for search.
- Token – A chunk of the original search query, usually a single word or phrase that is often modified by the analyzer to include synonyms, remove stop words and reformat to the root word.
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!
Frequently Asked Questions
What is Sitecore Exact Search?
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.
How do I configure exact match search in Sitecore Search?
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.
What is the Keyword analyzer in Sitecore Search?
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.
Why does the default Sitecore Search analyzer not always return exact matches?
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.
What is textual relevance in Sitecore Search?
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.
How do attribute weights affect Sitecore 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.
Can I use the Keyword analyzer with Sitecore Search textual relevance?
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.
Is exact match search the same as search relevance?
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.
Can Sitecore Exact Search be used with XM Cloud?
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.
When should I use exact match search in Sitecore Search?
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.


