Enable Ampersand ('&') Support in Search Suggestions

Created on 9 May 2025, about 1 month ago

Problem/Motivation

Enable Ampersand ('&') Support in Search Suggestions for OpenSolr or Suggestion

Steps to reproduce

Search for 3 or 4 with specical character ie & not giving suggestion eg "AT&T" or "Q&A"

Proposed resolution

The updated search suggestion functionality must correctly recognize and retain the ampersand (“&”) character within phrases and return correct search suggestions. This means that phrases containing ampersands, for example "AT&T" or "Q&A", should appear in the suggestion results.

Feature request
Status

Active

Version

4.1

Component

Code

Created by

🇮🇳India amitlokulwar Pune

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @amitlokulwar
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Since patches are no longer tested, a merge request needs to be provided.

  • 🇺🇸United States bkelly

    Hi Folks -

    This is interesting but I don't believe this is as simple as adding a character to a regx. My first thought is what about  , <, > and of course &....

    These are common in the content that's being parsed.

    I do think that special cases might be made possible via the "Priority Suggestions". If parsing rules were relaxed in some manner, (this may or may not be a complex issue). Then the special cases could be added to the index. There would have to be a respective change to the parsing in the SuggestionController so they weren't filtered out there also.

    I haven't investigated these possibilities but those are my first impressions.

    -- Bill Kelly

  • 🇺🇸United States bkelly

    Hi Folks -

    Not a fully baked thought here but... if all the HTML entities were translated into their corresponding text characters first then an updated regx might work.

    -- Bill Kelly

Production build 0.71.5 2024