jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: The infamous getSize() == -1 (Was: [jira] [Created] (OAK-300) Query: QueryResult.getRows().getSize())
Date Thu, 13 Sep 2012 02:20:36 GMT
On 12.09.2012, at 00:33, Thomas Mueller <mueller@adobe.com> wrote:

>> Display the actual number of search results to the user?
> Do you want to risk that the method getSize() takes 1.5 hours just to
> display the actual number of search results to the user?

Well, the application can decide if there are other options such as the proposed hasSize()
or getSize(max int) (which I like).

>> If they show "next page", they usually also show the number of results
>> and the number of pages.
> Yes, I understand it is a nice feature. But it is a very dangerous feature
> given the problems described above.

Developers are used to get fast counts in RDBMS with dedicated indexes.

View raw message