File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -631,15 +631,14 @@ def is_mongodb_6_3(self):
631
631
def supports_search_indexes (self ):
632
632
dummy_collection = "__null"
633
633
try :
634
- # Try to execute an search indexes operation over an existing collection.
634
+ # Create or get dummy collection.
635
635
try :
636
636
collection = self .connection .database .create_collection (dummy_collection )
637
637
except CollectionInvalid :
638
- # If the collection exists, it will be removed after this operation.
639
638
collection = self .connection .get_collection (dummy_collection )
639
+ # Check search indexes support (raises if unsupported).
640
640
collection .list_search_indexes ()
641
641
except OperationFailure :
642
- # Operation fails then search indexes isn't supported.
643
642
return False
644
643
else :
645
644
return True
You can’t perform that action at this time.
0 commit comments