You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2012/08/08 17:50:20 UTC
[jira] [Commented] (JCR-3407) CaseTermQuery #rewrite behavior
changes
[ https://issues.apache.org/jira/browse/JCR-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431180#comment-13431180 ]
Alex Parvulescu commented on JCR-3407:
--------------------------------------
I forgot to add, the query is xpath and comes from is from the sling I18N component:
{code:none}
//element(*,mix:language)[fn:lower-case(@jcr:language)='en']//element(*,sling:Message)[@sling:message]/(@sling:key|@sling:message)
{code}
> 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