jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon McNaughton (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-3252) Inflated QueryResultsImpl getTotalSize Count
Date Wed, 08 Aug 2012 05:41:09 GMT

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

Simon McNaughton updated JCR-3252:
----------------------------------

    Attachment: QueryResultImp_3252.patch

Adds a variable totalSize, which maintains a count of all valid entries.

The getResults function is extended to continue checking the score nodes after maxResultSize
nodes have been gathered. This is to continue scanning for nodes which the current session
has access to.

This will result in the return value for getTotalSize to be accurate even if there are nodes
in the result set for which the current session has no permission to access.
                
> Inflated QueryResultsImpl getTotalSize Count
> --------------------------------------------
>
>                 Key: JCR-3252
>                 URL: https://issues.apache.org/jira/browse/JCR-3252
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.1.6
>            Reporter: Simon McNaughton
>            Priority: Minor
>         Attachments: QueryResultImp_3252.patch
>
>
> The results of the method getTotalSize() in class org.apache.jackrabbit.core.query.lucene.QueryResultImpl
appear to sometimes be inflated.
> The method getTotalSize() returns the number of results of the query(numResults) minus
the number of results that the accessManager has not allowed access to (invalid). The value
of invalid appears to be determined during the method collectScoreNodes.
> The issue is that 'invalid' doesn't appear to accurately reflect the total number of
results of the orginal query that the user is not allowed access to, resulting in an incorrect
value for getTotalSize().
> The cause of this appears to be in method collectScoreNodes because it will only check
nodes to see if they are invalid while it is looking for the first 'maxResultSize' valid nodes.
Any nodes after that limit are not checked for validity. This may result in a number of nodes
that are invalid, but have not recorded as such. Then because the limit variable doesn't reflect
the actual number of invalid results, the getTotalSize() value is inflated.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message