You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
The text was updated successfully, but these errors were encountered:
You are right, suggestSearchTerms should only be called with a non null "search" parameter, otherwise it will throw NPE inside. Could you do a PR please?
Thanks, I'll do a PR after #722 is merged to avoid any conflict risk
archiloque
changed the title
Search suggestion is enable even without full search terms
Search suggestion is enabled even without full search terms
Oct 12, 2023
In
com.sismics.docs.core.util.indexing.LuceneIndexingHandler#findByCriteria
I found this code:It means that if
criteria.getSimpleSearch()
is filled andcriteria.getFullSearch()
isnull
,suggestSearchTerms
is called with anull
parameter. It feels wrong => in this case should the suggestion search be skipped ?The text was updated successfully, but these errors were encountered: