Thomas Mueller created OAK-2103:
-----------------------------------

             Summary: AggregateIndex: incorrect query plan and unneeded warning 
in the log file for some queries
                 Key: OAK-2103
                 URL: https://issues.apache.org/jira/browse/OAK-2103
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: query
            Reporter: Thomas Mueller
            Assignee: Thomas Mueller
            Priority: Minor


Note: This is just an annoyance in the log file, and doesn't affect the query 
result in any way, but it should be fixed anyway to avoid confusion for people 
reading the log file.

For aggregation queries of the form

{noformat}
/jcr:root/content//*[
  (jcr:contains(., 'test') or jcr:contains(metadata, 'test') 
  or jcr:contains(renditions, 'test')) and 
  jcr:contains(metadata/@format, 'image')] 
{noformat}

the index plan is incorrect: "/* aggregate Not yet implemented ..." instead of 
the aggregated index plan. The reason is that the query plan is not returned 
for an aggregation. The best solution for that is to implement the aggregated 
plan.

Also, in this case a warning is logged, saying that "More than one relative 
parent for query ...". This warning is logged because the Lucene index is asked 
for the cost twice in case of an aggregated query (once with the flattened 
query, and once for the complete query). The best solution for that is probably 
to not call the getCost method for aggregated queries. An alternative is to not 
log the warning.



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

Reply via email to