You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2014/11/26 09:08:13 UTC

[jira] [Commented] (OAK-2295) Using "order by jcr:score" slows down queries by a few orders of magnitude

    [ https://issues.apache.org/jira/browse/OAK-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14225881#comment-14225881 ] 

Thomas Mueller commented on OAK-2295:
-------------------------------------

According to my test, running "/jcr:root/content/help/en//*[jcr:contains(., 'illustrator')]" (without order by) will return the result very quickly, but then iterating over all nodes in the result still takes a lot of time (about 9 seconds).

If you use "order by @jcr:score", then the result is first loaded in memory, and then ordered, and then returned. 

I think if a full-text index is used, the "order by @jcr:score" should be delegated to the full-text index. I'm not sure if this is feasible with the current AggregateIndex; possibly we need to wait for the combined LucenePropertyIndex that can do full-text queries as well (and can do ordering).


> Using "order by jcr:score" slows down queries by a few orders of magnitude
> --------------------------------------------------------------------------
>
>                 Key: OAK-2295
>                 URL: https://issues.apache.org/jira/browse/OAK-2295
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: oak-lucene
>    Affects Versions: 1.0.8
>         Environment: Linux 2.6.32-431.23.3.el6.x86_64 VM, 
> 16GB RAM
> 4 Core Intel(R) Xeon(R) CPU E5-4640 0 @ 2.40GHz
>            Reporter: Punyanjan Sen
>            Priority: Critical
>
> The following query takes over 16 seconds to run on our QA system:
> /jcr:root/content/help/en//*[jcr:contains(., 'illustrator')] order by jcr:score
> Removing the "order by jcr:score" reduces the query time to 14ms
> The time taken increases linearly with the amount of content in our repository.



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