Skip to content

Trailing whitespace in the query is not supported #1156

@bojanbogdanovic

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.

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