|
Today I discovered the fault in my code and assumption. To make sure it filters on type, avoiding the field name conflict, the following code has to change from
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery);
to
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(luceneQuery, ReportAccessArea.class);
Without specifying the class for type filtering, results may come from other indexes as well. Specifying the class when creating the query builder does not enable type filtering, which I wrongly thought.
I hope this clarifies things and I am sorry for creating a bug for a user mistake.
|