Skip to content

Search suggestion is enabled even without full search terms #723

@archiloque

Description

@archiloque

In com.sismics.docs.core.util.indexing.LuceneIndexingHandler#findByCriteria I found this code:

        if (!Strings.isNullOrEmpty(criteria.getSimpleSearch()) || !Strings.isNullOrEmpty(criteria.getFullSearch())) {
            // …
            suggestSearchTerms(criteria.getFullSearch(), suggestionList);
        }

It means that if criteria.getSimpleSearch() is filled and criteria.getFullSearch() is null, suggestSearchTerms is called with a null parameter. It feels wrong => in this case should the suggestion search be skipped ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions