fix(facets): choose highest value in disjunctive #6536
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.
Summary:
When doing disjunctive faceting, there are two different sets of results:
Normally we want to use the facets of result 2, as those don't have the other constraints applied. think for example of this:
This was the behaviour before #6445. In #6445 we have swapped the order, to cater for "more tricky" use cases like non-exhaustive second response, less results in second response due to remove words optional or distinct.
see #6482, CR-7169, #6445.
Result:
Therefore now we take the middle ground: use the highest value. This works for all existing test cases, as well as newly introduced ones that simulate the "array" use case.