]
Emmanuel Bernard updated HSEARCH-812:
-------------------------------------
Fix Version/s: (was: 4.1)
Faceting: Possibiltiy to set behaviour (SHOULD/MUST) when selecting
multiple facets should (Elmer van Chastelet)
----------------------------------------------------------------------------------------------------------------
Key: HSEARCH-812
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-812
Project: Hibernate Search
Issue Type: Improvement
Components: query
Environment: -
Reporter: Elmer van Chastelet
Assignee: Hardy Ferentschik
Labels: faceting
Attachments: HSEARCH-812.diff, HSEARCH-812-doc.diff
Current implementation combines multiple facets from the same group by OR-ing them
(SHOULD):
{code}
private Query createSelectionGroupQuery(FacetSelectionImpl selection) {
BooleanQuery orQuery = new BooleanQuery();
for ( Facet facet : selection.getFacetList() ) {
orQuery.add( facet.getFacetQuery(), BooleanClause.Occur.SHOULD );
}
return orQuery;
}
{code}
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|https://hibernate.onjira.com/browse/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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: