Autocomplete Solr suggester doesn't support trailing whitespace

Created on 28 February 2025, about 1 month ago

Problem/Motivation

There are Solr lookup implementations where you actually want a suggestion after a space, for example with the "FreeTextLookupFactory" and using the space as separator.

Search API Autocomplete (submodule) trims trailing whitespace, which limits the capabilities of Solr suggesters like "FreeTextLookupFactory".

Steps to reproduce

The setQuery method from Solarium performs a trim, see:
https://git.drupalcode.org/project/search_api_solr/-/blob/4.3.8/modules/...
and https://github.com/solariumphp/solarium/blob/6.3.7/src/Component/QueryTr....

Proposed resolution

Update suggester to not trim on the right side of the query.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇳🇱Netherlands bojan_dev

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024