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

      10 Top Node.js Development Companies for Enterprise-Scale Projects (2025-2026 Ranked & Reviewed)

      July 4, 2025

      12 Must-Know Cost Factors When Hiring Node.js Developers for Your Enterprise

      July 4, 2025

      Mirantis reveals Lens Prism, an AI copilot for operating Kubernetes clusters

      July 3, 2025

      Avoid these common platform engineering mistakes

      July 3, 2025

      RIP, Perfect Dark — Xbox leadership canceled my most-anticipated game, and the developers deserved better

      July 6, 2025

      I keep seeing people at events taking notes on E-Ink tablets — so I tried one to see what all the fuss is about

      July 6, 2025

      “A fantastic device for creative users” — this $550 discount on ASUS’s 3K OLED creator laptop disappears before Prime Day

      July 5, 2025

      Distribution Release: Rhino Linux 2025.3

      July 5, 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

      Token System using PHP and MySQL

      July 6, 2025
      Recent

      Token System using PHP and MySQL

      July 6, 2025

      Create React UI component with uncontrollable

      July 6, 2025

      Flaget – new small 5kB CLI argument parser

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

      RIP, Perfect Dark — Xbox leadership canceled my most-anticipated game, and the developers deserved better

      July 6, 2025
      Recent

      RIP, Perfect Dark — Xbox leadership canceled my most-anticipated game, and the developers deserved better

      July 6, 2025

      I keep seeing people at events taking notes on E-Ink tablets — so I tried one to see what all the fuss is about

      July 6, 2025

      Le notizie minori del mondo GNU/Linux e dintorni della settimana nr 27/2025

      July 6, 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

    Artificial Intelligence

    Experiment with Gemini 2.0 Flash native image generation

    July 6, 2025
    Artificial Intelligence

    Introducing Gemma 3

    July 6, 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-32999 – “A-Blog CMS Cross-Site Scripting Vulnerability”

    Common Vulnerabilities and Exposures (CVEs)

    What’s the easiest way to deploy on a VPS?

    Web Development

    A first look at Laravel Nightwatch

    Development

    CVE-2025-52784 – Hideoguchi Bluff Post CSRF Stored XSS

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Artificial Intelligence

    Supplier order management: How a furniture retailer automated order confirmation processing

    April 24, 2025

    Selling custom-made furniture in this age of mass production is not easy. But this mid-sized,…

    macOS Apprentice [SUBSCRIBER]

    July 6, 2025

    CVE-2025-6739 – WordPress WPQuiz SQL Injection Vulnerability

    July 3, 2025

    Free Bootcamp Self-Learning Full Course in AI Digital Marketing for Children (Ages 6 –12)

    June 16, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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