Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      CodeSOD: A Unique Way to Primary Key

      July 22, 2025

      BrowserStack launches Figma plugin for detecting accessibility issues in design phase

      July 22, 2025

      Parasoft brings agentic AI to service virtualization in latest release

      July 22, 2025

      Node.js vs. Python for Backend: 7 Reasons C-Level Leaders Choose Node.js Talent

      July 21, 2025

      The best CRM software with email marketing in 2025: Expert tested and reviewed

      July 22, 2025

      This multi-port car charger can power 4 gadgets at once – and it’s surprisingly cheap

      July 22, 2025

      I’m a wearables editor and here are the 7 Pixel Watch 4 rumors I’m most curious about

      July 22, 2025

      8 ways I quickly leveled up my Linux skills – and you can too

      July 22, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025
      Recent

      The Intersection of Agile and Accessibility – A Series on Designing for Everyone

      July 22, 2025

      Zero Trust & Cybersecurity Mesh: Your Org’s Survival Guide

      July 22, 2025

      Execute Ping Commands and Get Back Structured Data in PHP

      July 22, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025
      Recent

      A Tomb Raider composer has been jailed — His legacy overshadowed by $75k+ in loan fraud

      July 22, 2025

      “I don’t think I changed his mind” — NVIDIA CEO comments on H20 AI GPU sales resuming in China following a meeting with President Trump

      July 22, 2025

      Galaxy Z Fold 7 review: Six years later — Samsung finally cracks the foldable code

      July 22, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Exact Match Search with Sitecore Search

    Exact Match Search with Sitecore Search

    April 17, 2025

    Searching for content on the web has evolved from basic string based matches to a sophisticated array of approaches including keywords, stemming, synonyms, word order, regular expressions, weights and relevance.  Users expect the highest ranking results to be the most relevant and 75% of users don’t go past the first page of results.  All of these advanced techniques are great to find relevant content.  But sometimes you need to find an exact phrase with the specific words in a specific order.  Many search engines do this by wrapping quote marks around the “search term” to indicate an exact match search. Sitecore Search defaults to relevance based searches, but you can achieve exact match search with some configuration.

    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.

    Sc Textual Reference A

    Domain Settings

    Edit the Textual Relevance section.

    Sc Textual Referenceb

    Textual Relevance Settings

    Add the keyword analyzer to the description attribute.

    Sc Textual Reference C

    Add Analyzer

    Sc Textual Reference D

    Select the keyword analyzer

    Make sure to save your changes then publish your domain settings for your changes to take effect.

    Configure Exact Match Search – Widget Settings

    Next we need to configure our search widget to use our textual relevance settings.

    Navigate to a widget variation and click add rule.

    Sc Textual Reference 1

    Add rule to a widget Variation

     

    Click the top icon on the left to set the site context.  Add a context rule for Keyword and select the contains option.  In the input box, type a single quote mark.

    Sc Textual Reference 2

    Add keyword rule to the site context

    Click the bottom icon on the left to configure the settings.  Click the tab for Textual Relevance and click the toggle to enable the configuration.  Notice that the description field is listed twice, once for each analyzer. From here you can enable/disable each attribute/analyzer and set its relative weight.  In this example, I’ve set the description-keyword to 3 and the name-multilocal to 1.  This will do the exact match search only on the description attribute.  You could include name-keyword analyzer to do an exact match on the name as well if that is desired.

    Sc Textual Reference 3

    Description keyword rule

    Repeat the process to add or modify a second rule that uses the description-multilocal analyzer.

    Sc Textual Reference 4 Rule2

    Description multilocale rule

    This rule will be the fallback if the search term does not include a quote.

    Sc Textual Reference 5

    Rule order and fallback

    Exact Match Search in Action

    With this configuration in place, you can see the difference in the search results.  In this example, I’ve searched for “proxy statements”.

    When you include a quote mark in the search term, you only get results that have the exact phrase “proxy statements”.  This search returns 12 results.

    Sc Textual Reference B1

    Exact match search with 12 results

    When you do not include the quote mark in the search term, you get results that include proxy, statements and statement.  This search returns 68 results.

    Sc Textual Reference A0

    Relevance search with 68 results

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleUniversal Design in Pharmacies: Key WCAG Principle – Robust
    Next Article Scoping, Hoisting and Temporal Dead Zone in JavaScript

    Related Posts

    Development

    GPT-5 is Coming: Revolutionizing Software Testing

    July 22, 2025
    Development

    Win the Accessibility Game: Combining AI with Human Judgment

    July 22, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-5666 – FreeFloat FTP Server XMKD Command Handler Buffer Overflow Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Matrix3D: Large Photogrammetry Model All-in-One

    Machine Learning

    Understanding Cryptocurrency: A Beginner’s Guide to Bitcoin and Ethereum

    Development

    CVE-2025-45878 – Miliaris Amigdala XSS

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Development

    Karate Framework for Simplified API Test Automation

    April 4, 2025

    API testing is a crucial component of modern software development, as it ensures that backend services and integrations function correctly, reliably, and securely. With the increasing complexity of distributed systems and microservices, validating API responses, performance, and behavior has become more important than ever. The Karate framework simplifies this process by offering a powerful and
    The post Karate Framework for Simplified API Test Automation appeared first on Codoid.

    Your Google Home just got 5 exciting upgrades for free – how to try them

    June 11, 2025

    GNU/Linux cresce a spese di Windows: tra nuove opportunità e vecchi ostacoli

    June 10, 2025

    CVE-2025-53475 – Advantech iView SQL Injection and Remote Code Execution Vulnerability

    July 10, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.