You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#. Create a collection with a randomly generated name (referred to as ``coll0``).
104
-
#. Create two new search indexes on ``coll0`` with the ``createSearchIndexes`` command. Use the following
104
+
#. Create two new search indexes on ``coll0`` with the ``createSearchIndexes`` helper. Use the following
105
105
definitions when creating the indexes. These definitions are referred to as ``indexDefinitions``.
106
106
107
107
.. code:: typescript
@@ -119,11 +119,11 @@ Case 2: Driver can successfully create multiple indexes in batch
119
119
}
120
120
}
121
121
122
-
#. Assert that the command does not error and the server responds with a success.
122
+
#. Assert that the command returns an array containing the new indexes' names: ``["test-search-index-1", "test-search-index-2"]``.
123
123
#. Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until the following condition is satisfied. Store
124
124
the result in ``indexes``.
125
-
1. An index with the ``name`` of ``test-search-index-1`` is present. The ``latestDefinition`` property of the search index has the field ``queryable`` with a value of ``true``.
126
-
2. An index with the ``name`` of ``test-search-index-2`` is present. The ``latestDefinition`` property of the search index has the field ``queryable`` with a value of ``true``.
125
+
1. An index with the ``name`` of ``test-search-index-1`` is present and index has the field ``queryable`` with a value of ``true``.
126
+
2. An index with the ``name`` of ``test-search-index-2`` is present and index has the field ``queryable`` with a value of ``true``.
127
127
#. For each ``index`` in ``indexDefinitions``
128
128
1. Find the matching index definition in ``indexes`` by matching on ``index.name``. If no index exists, raise an error.
129
129
2. Assert that the matching index ``mappings``, whose value is ``{ dynamic: false }``
@@ -143,10 +143,9 @@ Case 3: Driver can successfully drop search indexes
143
143
}
144
144
}
145
145
146
-
#. Assert that the command does not error and the server responds with a success.
146
+
#. Assert that the command returns the name of the index: ``"test-search-index"``.
147
147
#. Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until the following condition is satisfied:
148
-
1. An index with the ``name`` of ``test-search-index`` is present. This index is referred to as ``index``.
149
-
2. The ``latestDefinition`` property of the search index has the field ``queryable`` with a value of ``true``.
148
+
1. An index with the ``name`` of ``test-search-index`` is present and index has the field ``queryable`` with a value of ``true``.
150
149
151
150
#. Run a ``dropSearchIndexes`` on ``coll0``, using ``test-search-index`` for the name.
152
151
#. Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until ``listSearchIndexes`` returns an empty array.
@@ -168,10 +167,9 @@ Case 4: Driver can update a search index
168
167
}
169
168
}
170
169
171
-
#. Assert that the command does not error and the server responds with a success.
170
+
#. Assert that the command returns the name of the index: ``"test-search-index"``.
172
171
#. Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until the following condition is satisfied:
173
-
1. An index with the ``name`` of ``test-search-index`` is present. This index is referred to as ``index``.
174
-
2. The ``latestDefinition`` property of the search index has the field ``queryable`` with a value of ``true``.
172
+
1. An index with the ``name`` of ``test-search-index`` is present and index has the field ``queryable`` with a value of ``true``.
175
173
176
174
#. Run a ``updateSearchIndex`` on ``coll0``, using the following definition.
177
175
@@ -187,8 +185,8 @@ Case 4: Driver can update a search index
187
185
#. Assert that the command does not error and the server responds with a success.
188
186
#. Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until the following condition is satisfied:
189
187
1. An index with the ``name`` of ``test-search-index`` is present. This index is referred to as ``index``.
190
-
2. The ``latestDefinition`` property of the search index has the field ``queryable`` with a value of ``true``.
191
-
3. The ``latestDefinition`` property of the search index has the field ``status`` with the value of ``READY``.
188
+
2. The index has a field ``queryable`` with a value of ``true``.
189
+
3. The index has a ``latestDefinition`` property. The ``latestDefinition`` field has a property ``status`` with the value of ``READY``.
192
190
193
191
#. Assert that an index is present with the name ``test-search-index`` and the definition has a
194
192
property ``mappings``, whose value is ``{ dynamic: true }``
0 commit comments