Hi there,
I have the following mapping in hibernate/hibernate search:
entity B{ some other properties that go in filtering below (such as title) property enum status [ACTIVE|INACTIVE] }
entity A{ Set<entity B> Bs }
my search results are always A, and i'd like to search for A items containing ACTIVE B entities with a specific title
ex A.B = { (title1, ACTIVE), (title2, ACTIVE), (title3, INACTIVE)} in this case a search for title3 shouldn't bring any A results as the status filtering is always applied
however, the way i wrote my query (a boolean query where i append this: query.add(qb.keyword().onField("A.B.status").matching(ACTIVE).createQuery(), MUST);
the example above will actually bring the title3 result just because the index contains 2 other occurences of A.B.Status equal to ACTIVE.
many thanks for any idea on how to fix this!
-val
|