|
|
|
Currently, Hibernate Search store all the entities in the index without keeping track of the tenant. These has some conseguences: 1) Calling session.purgeAll(Example.class) will purge all the entry for Example.class without considering the tenant 2) A Lucene query will be executed on all the documents in the index, leading to load results that are not in from the database of wrong tenant - as the loader would use the current tenant we are considerin or that don - which implies loading of results which normally wouldn 't simply match the query criteria of the Query .
First problem is something people simply need to be aware off: we expect `purgeAll` to be mostly a maintenance or testing utility. The second problem can be worked around, by either using a custom sharding strategy or adding a `tenantId` token to the index in some way, then apply a fulltext filter when running queries.
|
|
|
|