Issues
- Using a SearchSort instance in multiple queries with the Lucene backend has side effects and leads to unexpected resultsHSEARCH-4513Resolved issue: HSEARCH-4513Yoann Rodière
- remove of entity with IndexedEmbedded collections cause LazyInitializationException during indexingHSEARCH-4365Resolved issue: HSEARCH-4365Yoann Rodière
- NPE on SingletonTaskHSEARCH-4363Resolved issue: HSEARCH-4363Fabio Massimo Ercoli
- HSEARCH000501: Invalid value for configuration property 'hibernate.search.backend.analysis.configurer'HSEARCH-4361Resolved issue: HSEARCH-4361Yoann Rodière
- Populated wrong Lucene librariesHSEARCH-4356Resolved issue: HSEARCH-4356Yoann Rodière
- MappingException: property [xxx] not found on entity [yyy]HSEARCH-4352Resolved issue: HSEARCH-4352Yoann Rodière
- java.lang.ClassCastException: org.hibernate.search.mapper.orm.bootstrap.impl.ExtendedBeanManagerSynchronizer cannot be cast to org.hibernate.jpa.event.spi.jpa.ExtendedBeanManager$LifecycleListenerHSEARCH-4349Resolved issue: HSEARCH-4349Yoann Rodière
- Mapping does not work when the properties are defined inside Groovy TraitsHSEARCH-4348Resolved issue: HSEARCH-4348Ollie Freeman
8 of 8
Using a SearchSort instance in multiple queries with the Lucene backend has side effects and leads to unexpected results
Fixed
Description
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
Activity
Show:
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.