rishabhdaim commented on code in PR #858:
URL: https://github.com/apache/jackrabbit-oak/pull/858#discussion_r1124587766


##########
oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentStore.java:
##########
@@ -486,4 +490,45 @@ default int getNodeNameLimit() {
     default Throttler throttler() {
         return NO_THROTTLING;
     }
+
+    /**
+     * Get a list of documents with only projected fields (as mentioned in 
projections param)
+     * along with "_id" field and where the key is greater than a start value 
and
+     * less than an end value <em>and</em> the given "indexed property" is 
greater
+     * or equals the specified value.
+     * <p>
+     * The indexed property can either be a {@link Long} value, in which case 
numeric
+     * comparison applies, or a {@link Boolean} value, in which case "false" 
is mapped
+     * to "0" and "true" is mapped to "1".
+     * <p>
+     * The returned documents are sorted by key and 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
+     * @param projections {@link List} of projected keys (optional). Keep this 
empty to fetch all fields on document.

Review Comment:
   We need a mechanism to fetch all the fields on the document. Since we don't 
know the field names in advance and they can change at any time (given the 
schema-less nature of Mongo), I think passing an empty list makes sense to 
fetch the entire document.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to