Fix beatmap search simple keyword exclusion still being included #12131
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Simplest fix I can think of 🤷 Resolves #12084.
currently, given map with tag "what" and no user tag, with search query
-what
:->should(['term' => ['_id' => ['value' => $this->params->queryString, 'boost' => 100]]])
no match -> no hit (correct)
->should(QueryHelper::queryString($this->params->queryString, $partialMatchFields, 'or', 1 / count($terms)))
matches excluded term -> no hit (correct)
->should(QueryHelper::queryString($this->params->queryString, [], 'and'))
matches excluded term -> no hit (correct)
->should(['nested' => ['path' => 'beatmaps', ...]])
doesn't match excluded term -> hit (incorrect)