jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon McNaughton (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (JCR-3252) Inflated QueryResultsImpl getTotalSize Count
Date Wed, 07 Mar 2012 06:26:09 GMT
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


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