Use a chained filter for example
Code:
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery(query, A.class);
Filter a = new Filter();
Filter b = new Filter();
ChainedFilter chainedFilter = new ChainedFilter(new Filter[]{a, b});
fullTextQuery.setFilter(chainedFilter );
You have the option to apply operators on the chained filter, so if you want to apply both of then and both must match you can do
Code:
ChainedFilter chainedFilter = new ChainedFilter(new Filter[]{a, b}, ChainedFilter.AND);
optional looks like:
Code:
ChainedFilter chainedFilter = new ChainedFilter(new Filter[]{a, b}, ChainedFilter.OR);
HTH