Piotr Tajduś created OAK-8487:
---------------------------------

             Summary: When query with OR is divided into union of queries, 
orderings are lost
                 Key: OAK-8487
                 URL: https://issues.apache.org/jira/browse/OAK-8487
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: core
    Affects Versions: 1.14.0
            Reporter: Piotr Tajduś


In org.apache.jackrabbit.oak.query.QueryImpl.buildAlternativeQuery() orderings 
are not passed into subqueries, nor into new UnionQueryImpl (it not only 
affects order, but in some cases cost of plans - in my case it caused index 
traversing).

I have fixed this in my copy of sources by setting orderings on result:
{code:java}
result = newAlternativeUnionQuery(left, right);
result.setOrderings(orderings);
}
}
return result;{code}
 

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to