[ 
https://issues.apache.org/jira/browse/LUCENE-4882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614616#comment-13614616
 ] 

Shai Erera commented on LUCENE-4882:
------------------------------------

Ahh. Well, you can still do without modifying CLB, by specifying 
OrdinalPolicy.ALL_PARENTS for you category lists. That's a change we've done in 
4.2, that the root dimension ordinal is not indexed by default (== 
OP.ALL_BUT_DIMENSION) to save some space as well as CPU cycles. The downside 
(besides the bug!) is that you don't get the count of the dimension. 
Performance-wise, this improved some, but not critical. So you can choose 
between overriding FacetIndexParams.getCategoryListParams() to always return a 
CLP which specifies OP.ALL_PARENTS for all categories, or extend CLB and apply 
the fix locally. In both cases, I would put the TODO :).
                
> FacetsAccumulator.java:185 throws NullPointerException if it's given an empty 
> CategoryPath.
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-4882
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4882
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/facet
>    Affects Versions: 4.2
>            Reporter: crocket
>            Assignee: Shai Erera
>            Priority: Critical
>             Fix For: 5.0, 4.3
>
>         Attachments: LUCENE-4882.patch
>
>
> When I wanted to count root categories, I used to pass "new CategoryPath(new 
> String[0])" to a CountFacetRequest.
> Since upgrading lucene from 4.1 to 4.2, that threw 
> ArrayIndexOfOutBoundsException, so I passed CategoryPath.EMPTY to a 
> CountFacetRequest instead, and this time I got NullPointerException.
> It all originates from FacetsAccumulator.java:185
> Does someone conspire to prevent others from counting root categories?

--
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to