jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3407) CaseTermQuery #rewrite behavior changes
Date Wed, 29 Aug 2012 09:22:07 GMT

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

Alex Parvulescu commented on JCR-3407:
--------------------------------------

I added another NPE chech with revision 1378487, just to make sure the NPE fix in DescendantSelfAxisQuery
covers other scenarios as well.
                
> CaseTermQuery #rewrite behavior changes
> ---------------------------------------
>
>                 Key: JCR-3407
>                 URL: https://issues.apache.org/jira/browse/JCR-3407
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: Alex Parvulescu
>            Assignee: Alex Parvulescu
>             Fix For: 2.6
>
>
> I've ran into a DescendantSelfAxisQuery query that generates a NPE [0].
> It seems that the CaseTermQuery #rewrite behavior changed after the Lucene upgrade.
> In the case where there are no hist, the MultiTermQuery now returns a bunch of BooleanQuery(ies),
which can produce null scorers.
> The pre-update behavior was to produce some ConstantScoreQuery queries.
> I'll change the rewrite method (#setRewriteMethod) to always produce a ConstantScoreQuery,
bypassing the existing optimization in lucene, but enforcing a safe (no nulls) scorer behavior
in jackrabbit.
> [0]
> java.lang.NullPointerException
> 	at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.collectContextHits(DescendantSelfAxisQuery.java:532)
> 	at org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSelfAxisScorer.nextDoc(DescendantSelfAxisQuery.java:473)
> 	at org.apache.jackrabbit.core.query.lucene.LuceneQueryHits.nextScoreNode(LuceneQueryHits.java:62)
> 	at org.apache.jackrabbit.core.query.lucene.QueryHitsAdapter.nextScoreNodes(QueryHitsAdapter.java:54)
> 	at org.apache.jackrabbit.core.query.lucene.FilterMultiColumnQueryHits.nextScoreNodes(FilterMultiColumnQueryHits.java:63)
> 	at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.collectScoreNodes(QueryResultImpl.java:328)
> 	at org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(QueryResultImpl.java:291)
> 	at org.apache.jackrabbit.core.query.lucene.SingleColumnQueryResult.<init>(SingleColumnQueryResult.java:66)
> 	at org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:134)

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

Mime
View raw message