Skip to content

Commit b33a9de

Browse files
committed
better comments
1 parent 2ab175a commit b33a9de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/kuzzleDataCollection.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ KuzzleDataCollection.prototype.fetchAllDocuments = function (options, cb) {
298298
if (searchResult instanceof KuzzleSearchResult) {
299299
if (searchResult.total > 10000 && !warnEmitted) {
300300
warnEmitted = true;
301-
console.warn('Usage of KuzzleDataCollection.fetchAllDocuments will fetch more than 10 000 document. To avoid performance issues, please use KuzzleDataCollection.search and KuzzleDataCollection.scroll requests')
301+
console.warn('KuzzleDataCollection.fetchAllDocuments may return extremely large amounts of documents, which may cause performance issues. Unless you know what you are doing, consider using KuzzleDataCollection.search or KuzzleDataCollection.scroll instead')
302302
}
303303

304304
searchResult.documents.forEach(document => {
@@ -460,7 +460,10 @@ KuzzleDataCollection.prototype.search = function (filters, options, cb) {
460460
};
461461

462462
/**
463-
* Scroll into a search result
463+
* A "scroll" option can be passed to search queries, creating persistent
464+
* paginated results.
465+
* This method can be used to manually get the next page of a search result,
466+
* instead of using KuzzleSearchResult.next()
464467
*
465468
* @param {string} scrollId
466469
* @param {object} [options]

0 commit comments

Comments
 (0)