Fixed
Details
Assignee
Yoann RodièreYoann RodièreReporter
Yoann RodièreYoann RodièreComponents
Sprint
NoneFix versions
Priority
Major
Details
Details
Assignee
Yoann Rodière
Yoann RodièreReporter
Yoann Rodière
Yoann RodièreComponents
Sprint
None
Fix versions
Priority
Created March 18, 2022 at 3:57 PM
Updated April 6, 2022 at 2:54 PM
Resolved March 21, 2022 at 8:14 AM
It seems the creation of a
SearchQuery
mutates aSearchSort
by callingorg.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneFieldComparatorSource#setOriginalParentQuery
(the comparator source being a component of theSearchSort
).Thus, if we create two queries with the same
SearchSort
instance, the secondSearchQuery
will have the final word on what gets passed tosetOriginalParentQuery
, and then executing the firstSearchQuery
will lead to unexpected results (since the sort uses the wrong Lucene query internally).SearchSort
should be immutable in order to avoid that.