| 1 |
description: "listSearchIndexes" |
| 2 |
schemaVersion: "1.4" |
| 3 |
createEntities: |
| 4 |
- client: |
| 5 |
id: &client0 client0 |
| 6 |
useMultipleMongoses: false |
| 7 |
observeEvents: |
| 8 |
- commandStartedEvent |
| 9 |
- database: |
| 10 |
id: &database0 database0 |
| 11 |
client: *client0 |
| 12 |
databaseName: *database0 |
| 13 |
- collection: |
| 14 |
id: &collection0 collection0 |
| 15 |
database: *database0 |
| 16 |
collectionName: *collection0 |
| 17 |
|
| 18 |
runOnRequirements: |
| 19 |
- minServerVersion: "7.0.0" |
| 20 |
topologies: [ replicaset, load-balanced, sharded ] |
| 21 |
serverless: forbid |
| 22 |
|
| 23 |
tests: |
| 24 |
- description: "when no name is provided, it does not populate the filter" |
| 25 |
operations: |
| 26 |
- name: listSearchIndexes |
| 27 |
object: *collection0 |
| 28 |
expectError: |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
isError: true |
| 33 |
errorContains: Atlas |
| 34 |
expectEvents: |
| 35 |
- client: *client0 |
| 36 |
events: |
| 37 |
- commandStartedEvent: |
| 38 |
command: |
| 39 |
aggregate: *collection0 |
| 40 |
pipeline: |
| 41 |
- $listSearchIndexes: {} |
| 42 |
|
| 43 |
- description: "when a name is provided, it is present in the filter" |
| 44 |
operations: |
| 45 |
- name: listSearchIndexes |
| 46 |
object: *collection0 |
| 47 |
arguments: |
| 48 |
name: &indexName "test index" |
| 49 |
expectError: |
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
isError: true |
| 54 |
errorContains: Atlas |
| 55 |
expectEvents: |
| 56 |
- client: *client0 |
| 57 |
events: |
| 58 |
- commandStartedEvent: |
| 59 |
command: |
| 60 |
aggregate: *collection0 |
| 61 |
pipeline: |
| 62 |
- $listSearchIndexes: { name: *indexName } |
| 63 |
$db: *database0 |
| 64 |
|
| 65 |
- description: aggregation cursor options are supported |
| 66 |
operations: |
| 67 |
- name: listSearchIndexes |
| 68 |
object: *collection0 |
| 69 |
arguments: |
| 70 |
name: &indexName "test index" |
| 71 |
aggregationOptions: |
| 72 |
batchSize: 10 |
| 73 |
expectError: |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
isError: true |
| 78 |
errorContains: Atlas |
| 79 |
expectEvents: |
| 80 |
- client: *client0 |
| 81 |
events: |
| 82 |
- commandStartedEvent: |
| 83 |
command: |
| 84 |
aggregate: *collection0 |
| 85 |
cursor: { batchSize: 10 } |
| 86 |
pipeline: |
| 87 |
- $listSearchIndexes: { name: *indexName } |
| 88 |
$db: *database0 |