MongoDB Count 方法弃用:使用 estimated_document_count 或 count_documents
这是一个警告信息,表示 MongoDB 的 count 方法已经被弃用,建议使用 estimated_document_count 或 count_documents 方法。同时,如果使用 '$where' 操作符,应该替换为 '$expr' 操作符;如果使用 '$near' 操作符,应该替换为 '$geoWithin' 操作符并使用 '$center' 参数;如果使用 '$nearSphere' 操作符,应该替换为 '$geoWithin' 操作符并使用 '$centerSphere' 参数。其中,col_law 是一个 MongoDB 集合对象,law_param 是一个查询条件参数。
原文地址: https://www.cveoy.top/t/topic/oUvk 著作权归作者所有。请勿转载和采集!