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] [Created] (JCR-3407) CaseTermQuery #rewrite behavior changes
Date Wed, 08 Aug 2012 15:40:22 GMT
Alex Parvulescu created JCR-3407:
------------------------------------

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


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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message