We're updating the issue view to help you get more done. 

Possibiltiy to set boolean type (SHOULD/MUST) when selecting multiple facets

Description

Current implementation combines multiple facets from the same group by OR-ing them (SHOULD):

1 2 3 4 5 6 7 private Query createSelectionGroupQuery(FacetSelectionImpl selection) { BooleanQuery orQuery = new BooleanQuery(); for ( Facet facet : selection.getFacetList() ) { orQuery.add( facet.getFacetQuery(), BooleanClause.Occur.SHOULD ); } return orQuery; }

It might be useful to also allow AND-ing the facets.
Some examples:
When searching for publications, I want the publications where both 'Kim' and 'John' are author
When searching for recipes, I want meals with both 'tomatoes' and 'eggs'.

This is in case of fields that might have mutliple values, so its working is relying on HSEARCH-726.

I currently have adapted the code myself, to be able to set AND/OR as default facet combinator, but this is not using the Hibernate Search Query language contexts. This improvement should be easy to implement.

Environment

-

Status

Assignee

Hardy Ferentschik

Reporter

Elmer van Chastelet

Labels

Suitable for new contributors

Yes, likely

Feedback Requested

None

Components

Fix versions

Priority

Major