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] [Resolved] (JCR-3407) CaseTermQuery #rewrite behavior changes
Date Thu, 09 Aug 2012 07:47:20 GMT

     [ https://issues.apache.org/jira/browse/JCR-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Alex Parvulescu resolved JCR-3407.

       Resolution: Fixed
    Fix Version/s: 2.6
         Assignee: Alex Parvulescu

I also changed the WildcardQuery behavior, as in my view it was an accident waiting to happen.

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


View raw message