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

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

    Affects Version/s:     (was: 2.1.6)
                       2.5.1
    
> 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.5.1
>            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

        

Reply via email to