I have situation that I can’t explain and can’t fix.
My roject is created using Java 18, Spring Boot 3.0.5, Hibernate ORM 6.1.7, Hibernate Search 6.1.8 with Lucene 8.11.1 embedded with Hibernate Search and the database is MySQL 8.
Few days ago I tried to switch to Hibernate ORM 6.2.1.
There was few minor things to adjust and the project was able to start.
Almost everything works fine except one simple search that takes about 50 ms with Hibernate 6.1.7 and 22000 ms with Hibernate 6.2.1:
final SearchScope<T> scope = searchSession.scope( Article.class );
final SearchQuery<T> q =
searchSession
.search(scope)
.where(searchPredicate)
.sort(sort)
.toQuery();
log.debug( q.toString() );
final org.hibernate.search.engine.search.query.SearchResult<T> searchResult =
q.fetch( 0, 1 );
query = +(+*:* +(textId:sr_rs__zdravo__tapir_0_33_l)^50.0),
sort =
<custom:"availability_numeric": org.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneNumericFieldComparatorSource@67e887b1>,
<custom:"importance_numeric": org.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneNumericFieldComparatorSource@15677589>!,
<custom:"hasPhotos": org.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneNumericFieldComparatorSource@48504390>!,
<custom:"completenessLevel": org.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneNumericFieldComparatorSource@2bdc3f1>!,
<custom:"sortableDate": org.hibernate.search.backend.lucene.types.sort.comparatorsource.impl.LuceneTextFieldComparatorSource@214b1918>!,
<score>
After switching versions I did update project by Eclipse and full index rebuild.
Also there is always the same entity used to test and the same steps.
Tried to toggle versions at least 5 times and every time there was project update and full index rebuild.
Is there anyone having similar issues?