...
Detailed steps to reproduce the problem? Use an Atlas DB/Cluster with a search index Query with $search as first stage in pipeline against a view -- pymongo correctly provides and error pymongo.errors.OperationFailure: $_internalSearchMongotRemote is only valid as the first stage in a pipeline, Query with $search as a first stage in pipeline against a view that has been defined without a pipeline. -- pymongo does not provide an error. i believe an empty cursor is returned Definition of done: what must be done to consider the task complete? pymongo should return an error similar to what it does for using $search against views without pipeline definitions as it does against views with a pipeline definion. The exact Python version used, with patch level: 3.9.6 (default, Nov 10 2023, 13:38:27) [Clang 15.0.0 (clang-1500.1.0.2.5)] The exact version of PyMongo used, with patch level: 4.6.1 True Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc. Atlas cluster, no sharding. Using search. The operating system and version (e.g. Windows 7, OSX 10.8, ...) Mac OS 14.1.2 (23B92) Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...) None
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.