@@ -53,6 +53,16 @@ target namespace.
53
53
:linenos:
54
54
:emphasize-lines: 10-12
55
55
56
+ Some examples use the ``toJSON()`` function to represent change events, which are BSON
57
+ documents, as Extended JSON. To use this function, paste the following code into your
58
+ application file:
59
+
60
+ .. literalinclude:: /includes/usage-examples/index-code-examples.php
61
+ :language: php
62
+ :dedent:
63
+ :start-after: start-to-json
64
+ :end-before: end-to-json
65
+
56
66
Single Field Index
57
67
------------------
58
68
@@ -112,6 +122,9 @@ that has GeoJSON object values:
112
122
:copyable:
113
123
:dedent:
114
124
125
+ To learn more about the GeoJSON data type, see :manual:`GeoJSON Objects
126
+ </reference/geojson/>` in the {+mdb-server+} manual.
127
+
115
128
.. TODO: To learn more about geospatial indexes, see the :ref:`php-geospatial-index`
116
129
.. guide.
117
130
@@ -164,12 +177,62 @@ ascending clustered index on the ``_id`` field:
164
177
.. TODO: To learn more about clustered indexes, see the :ref:`php-clustered-index`
165
178
.. guide.
166
179
180
+ Text Index
181
+ ----------
182
+
183
+ The following example creates a text index on the specified string field:
184
+
185
+ .. literalinclude:: /includes/usage-examples/index-code-examples.php
186
+ :start-after: start-text
187
+ :end-before: end-text
188
+ :language: php
189
+ :copyable:
190
+ :dedent:
191
+
192
+ .. TODO: To learn more about text indexes, see the :ref:`php-text-index`
193
+ .. guide.
194
+
195
+ List Indexes
196
+ ------------
197
+
198
+ The following example prints a list of indexes in the
199
+ specified collection:
200
+
201
+ .. literalinclude:: /includes/usage-examples/index-code-examples.php
202
+ :start-after: start-list
203
+ :end-before: end-list
204
+ :language: php
205
+ :copyable:
206
+ :dedent:
207
+
208
+ Delete an Index
209
+ ---------------
210
+
211
+ The following example deletes an index with the specified name:
212
+
213
+ .. literalinclude:: /includes/usage-examples/index-code-examples.php
214
+ :start-after: start-remove
215
+ :end-before: end-remove
216
+ :language: php
217
+ :copyable:
218
+ :dedent:
219
+
220
+ .. TODO: To learn more about removing indexes, see :ref:`php-indexes-remove`
221
+ .. in the Work with Indexes guide.
222
+
167
223
Atlas Search Index Management
168
224
-----------------------------
169
225
170
226
The following sections contain code examples that describe how to manage
171
227
:atlas:`Atlas Search indexes </atlas-search/manage-indexes/>`.
172
228
229
+ .. note:: Search Index Management is Asynchronous
230
+
231
+ The {+php-library+} manages Atlas Search indexes asynchronously. The
232
+ library methods described in the following sections return the server
233
+ response immediately, but the changes to your Search indexes take
234
+ place in the background and might not complete until some time later.
235
+
173
236
.. To learn more about Atlas Search indexes, see the :ref:`php-atlas-search-index`
174
237
.. guide.
175
238
@@ -233,47 +296,4 @@ The following example deletes an Atlas Search index with the specified name:
233
296
:dedent:
234
297
235
298
.. To learn more about deleting search indexes, see the :ref:`php-atlas-search-index-drop`
236
- .. guide.
237
-
238
- Text Index
239
- ----------
240
-
241
- The following example creates a text index on the specified string field:
242
-
243
- .. literalinclude:: /includes/usage-examples/index-code-examples.php
244
- :start-after: start-text
245
- :end-before: end-text
246
- :language: php
247
- :copyable:
248
- :dedent:
249
-
250
- .. TODO: To learn more about text indexes, see the :ref:`php-text-index`
251
- .. guide.
252
-
253
- List Indexes
254
- ------------
255
-
256
- The following example prints a list of indexes in the
257
- specified collection:
258
-
259
- .. literalinclude:: /includes/usage-examples/index-code-examples.php
260
- :start-after: start-list
261
- :end-before: end-list
262
- :language: php
263
- :copyable:
264
- :dedent:
265
-
266
- Delete an Index
267
- ---------------
268
-
269
- The following example deletes an index with the specified name:
270
-
271
- .. literalinclude:: /includes/usage-examples/index-code-examples.php
272
- :start-after: start-remove
273
- :end-before: end-remove
274
- :language: php
275
- :copyable:
276
- :dedent:
277
-
278
- .. TODO: To learn more about removing indexes, see :ref:`php-indexes-remove`
279
- .. in the Work with Indexes guide.
299
+ .. guide.
0 commit comments