-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find query does not return the cloudant bookmark field #3
Comments
@flam312 Any update on this - did you find a work around? |
@bwghughes I did find a work around by using the loopback skip filter. https://docs.strongloop.com/display/public/LB/Skip+filter I basically have a recursive function that executes the same query using the skip filter to page through the results. However, I feel that the connector should be doing this and returning the total amount for us. |
@tonyffrench +1 for resolving this defect as discussed offline today. |
Cloudant Query search limits by design the number of documents returned to 200. I'm investigating a way to surface the bookmark feature. Another alternative maybe to switch between text search vs json search. |
+1 For updating the connector so that it returns the whole list of documents if there's more than 200 |
👍 |
+1 here as well. |
Version 1.0.5 should now be out on NPM |
I am using the loopback model find function with the loopback-connector for cloudant. The number of models returned are always <= 200. Upon further investigation I found that this is a limitation imposed by cloudant's query.
https://developer.ibm.com/answers/questions/233525/nodered-cloudant-using-cloudant-node/
https://docs.cloudant.com/cloudant_query.html#finding-documents-using-an-index
The bookmark field is used to for paging through the result sets each of which being a max of 200 rows.
When debugging the Find matching model instances by filter code in lib\cloudant.js it looks like the query results return both a doc and bookmark field. However, the results.doc is the only thing that is callback.
Is there a way to have a filtered query result of greater than 200 or use the bookmark to page through in the current connector implementation?
The text was updated successfully, but these errors were encountered: