jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-2926) Fast result size estimate
Date Tue, 02 Jun 2015 14:16:30 GMT

     [ https://issues.apache.org/jira/browse/OAK-2926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Thomas Mueller updated OAK-2926:
--------------------------------
    Attachment: OAK-2926.patch

OAK-2926.patch (work in progress)

[~alex.parvulescu] and [~chetanm] could you please have a look and provide feedback?

This patch should already work, but there are some areas that need to be improved and further
tested. To enable it, set the system property "oak.fastQuerySize" to "true" (java -Doak.fastQuerySize=true
...). The system property can also be enabled / disabled while the system is already running.

It currently only works with the "new" Lucene index ("compatVersion=2", aggregation at index
time). getSize for Solr and the "old" Lucene full-text index is not implemented yet, however
if this is needed it should be relatively easy.

I would like to add more tests (even thought, there are already two test cases). The API should
be reviewed.

I'm not sure if the system would run out of memory if the result is very large (millions of
entries). This would need to be reviewed by a Lucene expert.

> Fast result size estimate
> -------------------------
>
>                 Key: OAK-2926
>                 URL: https://issues.apache.org/jira/browse/OAK-2926
>             Project: Jackrabbit Oak
>          Issue Type: New Feature
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>              Labels: performance
>         Attachments: OAK-2926.patch
>
>
> When asking for the correct result size of a query, the complete result needs to be read,
so that access rights checks are made, and (unless the index is known to be up-to-date, and
can process all conditions) so that the existence and all query conditions are checked.
> Jackrabbit 2.x supports a fast way to get an estimate of the result size, without doing
access rights checks. See also JCR-3858.
> Please note that according to the JCR API, NodeIterator.getSize() may return -1 (for
"unknown"), and in Oak this is currently done if counting is slow. This would also need to
be disabled if a fast result size estimate is needed.



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

Mime
View raw message