jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cédric Damioli (JIRA) <j...@apache.org>
Subject [jira] [Commented] (JCR-3402) getSize() returning too many often -1
Date Thu, 07 Feb 2013 09:47:13 GMT

    [ https://issues.apache.org/jira/browse/JCR-3402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13573351#comment-13573351

Cédric Damioli commented on JCR-3402:

I've refactored the patch. It now handle more cases.

Actual size and total size are only set when accurate.
Lucene results aren't considered anymore when computing size, so that size does not shrink
over time as before.

The only drawback is that when limit is set and reached, the total size cannot be estimated
anymore. But IMHO it's a good thing.
I've modified a test case for not failing in that particular case.

Marcel, Jukka, could you have a look ?
> getSize() returning too many often -1
> -------------------------------------
>                 Key: JCR-3402
>                 URL: https://issues.apache.org/jira/browse/JCR-3402
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>            Reporter: Cédric Damioli
>         Attachments: QueryResultImpl.patch
> I've came accross the well known behaviour of query results returning -1 when asked for
> While this is ok for optimization reasons (lazy results fetching), I just discovered
that the default "resultFetchSize" value in lucene queries is Integer.MAX_VALUE, so in all
queries I've ever executed, all results were actually fetched before asking for getSize, so
IMHO nothing prevents getSize() to return the real value instead -1

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message