Hello,
I have hibernate search working perfect in that it indexes everything and I can find all I require to.
I now wish to add some filters to the query / overall results such that I remove the items which are not applicable.
Entity1
Code:
@ElementCollection(targetClass = Type.class, fetch = FetchType.EAGER)
@Enumerated(EnumType.STRING)
private Set<Type> types = new HashSet<Type>();
Code:
FullTextQuery fq = fullTextEntityManager.createFullTextQuery(query, Entity1.class, Entity2.class, Entity3.class, Entity4.class);
I've read a bit about adding filters using
Code:
fq.enableFullTextFilter(arg0)
But haven't seen much in how I define my filter in the entity such that I can pass in a Type value and only get search results for that type.
Does anyone have any pointers please?
Chris