You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could possible be of use; OPTIMIZE_PAGINATION_FOR_SPEED could be replaced with something like PAGINATION_STRATEGY and a corresponding resource override pagination_strategy with options full count, estimated count and no count.
Adds a last_document_count property to the mongo data layer. This
approach does not break the base DataLayer contract.
In determining the number of documents we do our best to use the new
count_documents() method introduced with PyMongo 3.7. However,
count_documents() does not support the $where operator. It must be
replaced with $expr, which in turn is not supported by older Mongos
(3.4-). Since we do not want to impose a limit on the supported DB
version, for the time being we will fallback to the deprecated
cursor.count() if needed.