jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sham (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OAK-4602) IndexOutOfBoundsException while sorting by multiple fields which has function and property
Date Tue, 26 Jul 2016 12:22:20 GMT
Sham created OAK-4602:
-------------------------

             Summary: IndexOutOfBoundsException while sorting by multiple fields which has
function and property
                 Key: OAK-4602
                 URL: https://issues.apache.org/jira/browse/OAK-4602
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: lucene
    Affects Versions: 1.4.1
         Environment: AEM 6.1, 6.2 
            Reporter: Sham


The quert written in jackrabbit sort by not working with oak.   Samples order by which fails
is [0]  & stack trace at [2].   If I change the sort [1] it works & issue reproducible
on any oak branch also,  Additional This happens only with custom index definition.   The
exact query & index definition at [3]. 


[0]
order by @jcr:score descending, post/@pubDate descending
order by  @jcr:score,post/@pubDate descending

[1]
order by  post/@pubDate descending,@jcr:score descending


[2]

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

at java.util.ArrayList.rangeCheck(ArrayList.java:653)

at java.util.ArrayList.get(ArrayList.java:429)

at org.apache.jackrabbit.oak.plugins.index.lucene.IndexPlanner$PlanResult.getOrderedProperty(IndexPlanner.java:540)

at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex.getSort(LucenePropertyIndex.java:605)

at org.apache.jackrabbit.oak.plugins.index.lucene.LucenePropertyIndex.query(LucenePropertyIndex.java:281)

at org.apache.jackrabbit.oak.query.ast.SelectorImpl.execute(SelectorImpl.java:329)

at org.apache.jackrabbit.oak.query.QueryImpl$RowIterator.fetchNext(QueryImpl.java:769)

at org.apache.jackrabbit.oak.query.QueryImpl$RowIterator.hasNext(QueryImpl.java:798)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at com.google.common.collect.Iterators$5.hasNext(Iterators.java:542)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.fetchNext(FilterIterators.java:137)

at org.apache.jackrabbit.oak.query.FilterIterators$DistinctIterator.hasNext(FilterIterators.java:151)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.init(FilterIterators.java:203)

at org.apache.jackrabbit.oak.query.FilterIterators$SortIterator.hasNext(FilterIterators.java:237)

at org.apache.jackrabbit.oak.jcr.query.QueryResultImpl$3.fetch(QueryResultImpl.java:181)

at org.apache.jackrabbit.oak.jcr.query.QueryResultImpl$3.<init>(QueryResultImpl.java:176)

at org.apache.jackrabbit.oak.jcr.query.QueryResultImpl.getNodes(QueryResultImpl.java:170)

at com.adobe.granite.queries.impl.explain.query.ExplainQueryServlet.executionTimes(ExplainQueryServlet.java:331)



[3]

/jcr:root/content//element(*, cq:PageContent)[(jcr:contains(post/@headingText, 'geometrixx')
or jcr:contains(jcr:title, 'sales') or jcr:contains(pageTitle, 'geometrixx') or jcr:contains(title,
'geometrixx') or jcr:contains(cq:tags, 'geometrixx') or jcr:contains(post/@subheadingText,
'geometrixx') or jcr:contains(post/par/*, 'geometrixx') or jcr:contains(post/@authorName,
'geometrixx'))] order by @jcr:score descending, post/@pubDate descending



{"jcr:primaryType":"oak:QueryIndexDefinition","compatVersion":2,"type":"lucene","async":"async","evaluatePathRestrictions":true,"excludedPaths":["/jcr:system","/etc","/var"],"reindex":false,"reindexCount":5,"aggregates":{"jcr:primaryType":"nt:unstructured","cq:PageContent":{"jcr:primaryType":"nt:unstructured","postParsys":{"jcr:primaryType":"nt:unstructured","relativeNode":true,"path":"post/par/*/richText"},"include3":{"jcr:primaryType":"nt:unstructured","relativeNode":true,"path":"cq:tags"},"include2":{"jcr:primaryType":"nt:unstructured","relativeNode":true,"path":"title"},"include1":{"jcr:primaryType":"nt:unstructured","relativeNode":true,"path":"pageTitle"},"include0":{"jcr:primaryType":"nt:unstructured","relativeNode":true,"path":"jcr:title"}}},"indexRules":{"jcr:primaryType":"nt:unstructured","cq:PageContent":{"jcr:primaryType":"nt:unstructured","properties":{"jcr:primaryType":"nt:unstructured","postHeadingText":{"jcr:primaryType":"nt:unstructured","analyzed":true,"name":"post/headingText","type":"String"},"postSubHeadingText":{"jcr:primaryType":"nt:unstructured","analyzed":true,"name":"post/subheadingText","type":"String"},"postAuthorName":{"jcr:primaryType":"nt:unstructured","analyzed":true,"name":"post/authorName","type":"String"},"pubDate":{"jcr:primaryType":"nt:unstructured","ordered":true,"direction":"descending","name":"post/pubDate","type":"Date"}}}}}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message