Skip to content

Trailing whitespace in the query is not supported #1156

Description

@bojanbogdanovic

Solarium version(s) affected: 6.3.*
Solr version: all
Solr mode: standalone / cloud

Description
This is a follow-up of: https://www.drupal.org/project/search_api_solr/issues/3509593

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.

Solarium trims whitespace on the query, which limits the capabilities of Solr suggesters like "FreeTextLookupFactory".

How to reproduce
See: https://github.com/solariumphp/solarium/blob/6.3.7/src/Component/QueryTrait.php#L34

Possible Solution
Only trim on the left side of the query or remove trim function completely from the setQuery method.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions