jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: DocumentStore.query limit parameter
Date Thu, 12 Dec 2013 07:52:41 GMT
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 

> -----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
> 
> >     /**
> >      * Get a list of documents where the key is greater than a start value and
> >      * less than an end value. The returned documents are immutable.
> >      *
> >      * @param <T> 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
> >     <T extends Document> List<T> query(Collection<T> collection,
> >                                        String fromKey,
> >                                        String toKey,
> >                                        String indexedProperty,
> >                                        long startValue,
> >                                        int limit);
> 
> Is some kind of ordering implied? (Otherwise, how does "limit" make sense?)
> 
> Best regards, Julian

Mime
View raw message