I've added Hibernate multi-tenancy to my persistence unit and I started noticing weird results from Hibernate Search queries and then I've identified this log:
INFO [org.hibernate.search.backend.impl.lucene.works.IndexUpdateVisitor] (Hibernate Search sync consumer thread for index it.saiv.oss.common.model.entity.Person) HSEARCH000249: Cannot do fast deletes on index 'it.saiv.oss.common.model.entity.Person'. Entities in this index are conflicting or the index can accept unknown entities.
So I set an indexBase on my persistence unit and I noticed indexes are organized by class, so maybe different tenants are clashing on the same indexes for each class.
This is the relevant part of my persistence unit properties:
This log is only informational, and merely states that an optimization couldn't be enabled. Your queries should work fine regardless.
Are you experimenting with multitenancy, or was it already working before your upgraded to Hibernate Search 5.7? Also, does multitenancy work correctly with your Hibernate ORM queries?
Could you please give us more information about the actual issue you are experiencing? An example query with the expected result/actual result would help. It would be even better if you could share the mapping of the entities involved.
And of course, if you know how to reproduce the issue, providing a test case is the best way to get it solved quickly. You can find a test case template here (the one you're looking for is hibernate-search-lucene).
Edited; I meant "Are you experimenting with multitenancy, or was it already working before your upgraded to Hibernate Search 5.7?"
Thank you Yoann, I'll try to reproduce in a test case. I understand the log is informational, but I don't know how indexes are discriminated when multi-tenancy is involved. I mean: two tenant on the same persistence unit could have two instances of the same class, same id, but different field values.
The issue I'm experiencing is just that: a search query may return entities which satisfies the query for a different tenant.
As for your question: I've added multitenancy a couple of weeks ago, with the first Beta of Search 5.7 and I'm experiencing this since then.