[
https://issues.apache.org/jira/browse/SOLR-9687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15604000#comment-15604000
]
ASF subversion and git services commented on SOLR-9687:
-------------------------------------------------------
Commit 96e847a10c532663e39ad2de184ed8582e5eb0e2 in lucene-solr's branch
refs/heads/branch_6x from Tomas Fernandez Lobbe
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=96e847a ]
SOLR-9687: Fixed Interval Facet count issue in cases of open/close intervals on
the same values
> Values not assigned to all valid Interval Facet intervals in some cases
> -----------------------------------------------------------------------
>
> Key: SOLR-9687
> URL: https://issues.apache.org/jira/browse/SOLR-9687
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: faceting
> Affects Versions: 5.3.1
> Reporter: Andy Chillrud
> Assignee: Tomás Fernández Löbbe
> Attachments: SOLR-9687.patch
>
>
> Using the interval facet definitions:
> * \{!key=Positive}(0,*]
> * \{!key=Zero}\[0,0]
> * \{!key=Negative}(*,0)
> A document with the value "0" in the numeric field the intervals are being
> applied to is not counted in the Zero interval. If I change the order of the
> definitions to , Negative, Zero, Positive the "0" value is correctly counted
> in the Zero interval.
> Tracing into the 5.3.1 code the problem is in the
> org.apache.solr.request.IntervalFacets class. When the getSortedIntervals()
> method sorts the interval definitions for a field by their starting value is
> doesn't take into account the startOpen property. When two intervals have
> equal start values it needs to sort intervals where startOpen == false before
> intervals where startOpen == true.
> In the accumIntervalWithValue() method it checks which intervals each
> document value should be considered a match for. It iterates through the
> sorted intervals and stops checking subsequent intervals when
> LOWER_THAN_START result is returned. If the Positive interval is sorted
> before the Zero interval it never checks a zero value against the Zero
> interval.
> I compared the 5.3.1 version of the IntervalFacets class against the 6.2.1
> code, and it looks like the same issue will occur in 6.2.1.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]