Issue Type: Bug Bug
Affects Versions: 4.3.0.CR1
Assignee: Unassigned
Components: query
Created: 04/Jun/13 1:15 PM
Description:

The following pseudo code scenario is expected to work but fails

//create some facet requests
//enable the facet requests
Facet facet1 = facetManager.getFacets( facetGroupName1 ).get( 0 );
facetManager.getFacetGroup( facetGroupName1 ).selectFacets( facet1 );
List<Facet> recomputedFacets = facetManager.getFacets( facetGroupName1 );
Facet almostFacet1 = facetManager.getFacets( facetGroupName1 ).get(0);
// Following test fails
assertTrue( facetManager.getFacetGroup( facetGroupName1 ).contains( almostFacet1 ) ); 

This is due to the fact that facet objects are different (between selected ones and recomputed ones) and that equals takes the count into account.

There are two possible fixes:

  • replace selectedFacet with recomputed ones
  • not take count as part of Facet's equality
Project: Hibernate Search
Priority: Major Major
Reporter: Emmanuel Bernard
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira