{ "description": "listSearchIndexes", "schemaVersion": "1.4", "createEntities": [ { "client": { "id": "client0", "useMultipleMongoses": false, "observeEvents": [ "commandStartedEvent" ] } }, { "database": { "id": "database0", "client": "client0", "databaseName": "database0" } }, { "collection": { "id": "collection0", "database": "database0", "collectionName": "collection0" } } ], "runOnRequirements": [ { "minServerVersion": "7.0.0", "topologies": [ "replicaset", "load-balanced", "sharded" ], "serverless": "forbid" } ], "tests": [ { "description": "when no name is provided, it does not populate the filter", "operations": [ { "name": "listSearchIndexes", "object": "collection0", "expectError": { "isError": true, "errorContains": "Atlas" } } ], "expectEvents": [ { "client": "client0", "events": [ { "commandStartedEvent": { "command": { "aggregate": "collection0", "pipeline": [ { "$listSearchIndexes": {} } ] } } } ] } ] }, { "description": "when a name is provided, it is present in the filter", "operations": [ { "name": "listSearchIndexes", "object": "collection0", "arguments": { "name": "test index" }, "expectError": { "isError": true, "errorContains": "Atlas" } } ], "expectEvents": [ { "client": "client0", "events": [ { "commandStartedEvent": { "command": { "aggregate": "collection0", "pipeline": [ { "$listSearchIndexes": { "name": "test index" } } ], "$db": "database0" } } } ] } ] }, { "description": "aggregation cursor options are supported", "operations": [ { "name": "listSearchIndexes", "object": "collection0", "arguments": { "name": "test index", "aggregationOptions": { "batchSize": 10 } }, "expectError": { "isError": true, "errorContains": "Atlas" } } ], "expectEvents": [ { "client": "client0", "events": [ { "commandStartedEvent": { "command": { "aggregate": "collection0", "cursor": { "batchSize": 10 }, "pipeline": [ { "$listSearchIndexes": { "name": "test index" } } ], "$db": "database0" } } } ] } ] } ] }