Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 49385 invoked from network); 4 Aug 2007 01:20:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2007 01:20:17 -0000 Received: (qmail 41400 invoked by uid 500); 4 Aug 2007 01:20:15 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 40814 invoked by uid 500); 4 Aug 2007 01:20:13 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 40798 invoked by uid 99); 4 Aug 2007 01:20:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 18:20:13 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Aug 2007 01:20:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0C2D37141EF for ; Fri, 3 Aug 2007 18:19:53 -0700 (PDT) Message-ID: <25627028.1186190393047.JavaMail.jira@brutus> Date: Fri, 3 Aug 2007 18:19:53 -0700 (PDT) From: "Christoph Kiehl (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-989) Modify LazyQueryResultImpl to allow resultFetchSize to be set programmatically In-Reply-To: <19781523.1182951986078.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christoph Kiehl updated JCR-989: -------------------------------- Attachment: jackrabbit-core.patch jackrabbit-api.patch I finally made it. Took me a bit more than a few days however ;) I decided to create a new interface JackrabbitQuery in jackrabbit-api which includes the two methods setOffset() and setLimit() which will probably be part of JCR 2.0. This way you don't have to cast your Query instance to QueryImpl but rather JackrabbitQuery. This hopefully makes it more accessible to users and looks less like a hack. ((QueryImpl) query).setLimit(123) vs ((JackrabbitQuery) query).setLimit(123) This opens the possibility to provide an RMI implementation to support those two methods over RMI as well. Everything else was quite straight forward. There are two patches: one for jackrabbit-api containing the interface and one for jackrabbit-core containing the actual code changes. WDYT? > Modify LazyQueryResultImpl to allow resultFetchSize to be set programmatically > ------------------------------------------------------------------------------ > > Key: JCR-989 > URL: https://issues.apache.org/jira/browse/JCR-989 > Project: Jackrabbit > Issue Type: New Feature > Components: query > Affects Versions: 1.3 > Reporter: Christoph Kiehl > Assignee: Christoph Kiehl > Priority: Minor > Attachments: jackrabbit-api.patch, jackrabbit-core.patch > > > In our application we have a search which only shows part of a query result. We always know which part of the result needs to be shown. This means we know in advance how many results need to be fetched. I would like to be able to programmatically set resultFetchSize to minimize the number of loaded lucene docs and therefore improve the performance. > I know it is already possible to the set the resultFetchSize via the index configuration, but this number is fixed and doesn't work well in environments where you use paging for your results because if you set this number too low the query will be executed multiple times and if you set it too high too many lucene docs are loaded. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.