Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BC52109C2 for ; Thu, 12 Dec 2013 07:53:28 +0000 (UTC) Received: (qmail 5241 invoked by uid 500); 12 Dec 2013 07:53:23 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 4387 invoked by uid 500); 12 Dec 2013 07:53:18 -0000 Mailing-List: contact oak-dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-dev@jackrabbit.apache.org Received: (qmail 4379 invoked by uid 99); 12 Dec 2013 07:53:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 07:53:16 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mreutegg@adobe.com designates 64.18.1.78 as permitted sender) Received: from [64.18.1.78] (HELO exprod6og127.obsmtp.com) (64.18.1.78) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Dec 2013 07:53:08 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob127.postini.com ([64.18.5.12]) with SMTP ID DSNKUqlrTgIc1huMSztlSMzHrHe9+JHx+lGu@postini.com; Wed, 11 Dec 2013 23:52:47 PST Received: from inner-relay-1.corp.adobe.com (inner-relay-1.corp.adobe.com [153.32.1.51]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id rBC7qipT026768 for ; Wed, 11 Dec 2013 23:52:45 -0800 (PST) Received: from nacas02.corp.adobe.com (nacas02.corp.adobe.com [10.8.189.100]) by inner-relay-1.corp.adobe.com (8.12.10/8.12.10) with ESMTP id rBC7qh8i020280 for ; Wed, 11 Dec 2013 23:52:43 -0800 (PST) Received: from eurcas01.eur.adobe.com (10.128.4.27) by nacas02.corp.adobe.com (10.8.189.100) with Microsoft SMTP Server (TLS) id 8.3.327.1; Wed, 11 Dec 2013 23:52:43 -0800 Received: from eurmbx01.eur.adobe.com ([10.128.4.32]) by eurcas01.eur.adobe.com ([10.128.4.27]) with mapi; Thu, 12 Dec 2013 07:52:42 +0000 From: Marcel Reutegger To: "oak-dev@jackrabbit.apache.org" Date: Thu, 12 Dec 2013 07:52:41 +0000 Subject: RE: DocumentStore.query limit parameter Thread-Topic: DocumentStore.query limit parameter Thread-Index: Ac72io9GMW9WkrgHRaO0ndxP6scGewAghCTw Message-ID: <9C0FC4C8E9C29945B01766FC7F9D389818A81563D9@eurmbx01.eur.adobe.com> References: <52A88CB3.7060206@gmx.de> In-Reply-To: <52A88CB3.7060206@gmx.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Hi, yes, the returned documents must be sorted in ascending key order. though, I just noticed MongoDocumentStore does not add a sort() to the query and ascending order of the result is just a coincidence. MongoDB uses the index of the _id field and will likely return the documents in the correct order. I'll create an issue for the missing sort(). Regards Marcel=20 > -----Original Message----- > From: Julian Reschke [mailto:julian.reschke@gmx.de] > Sent: Mittwoch, 11. Dezember 2013 17:03 > To: oak-dev@jackrabbit.apache.org > Subject: DocumentStore.query limit parameter >=20 > > /** > > * Get a list of documents where the key is greater than a start va= lue and > > * less than an end value. The returned documents are immutable. > > * > > * @param the document type > > * @param collection the collection > > * @param fromKey the start value (excluding) > > * @param toKey the end value (excluding) > > * @param indexedProperty the name of the indexed property > (optional) > > * @param startValue the minimum value of the indexed property > > * @param limit the maximum number of entries to return > > * @return the list (possibly empty) > > */ > > @Nonnull > > List query(Collection collection, > > String fromKey, > > String toKey, > > String indexedProperty, > > long startValue, > > int limit); >=20 > Is some kind of ordering implied? (Otherwise, how does "limit" make sense= ?) >=20 > Best regards, Julian