File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 29
29
// end-search-create
30
30
31
31
// start-search-list
32
- foreach ($ collection ->listIndexes () as $ indexInfo ) {
32
+ foreach ($ collection ->listSearchIndexes () as $ indexInfo ) {
33
33
var_dump ($ indexInfo );
34
34
}
35
35
// end-search-list
74
74
$ database ->createCollection ('<collection name> ' , $ options );
75
75
// end-clustered
76
76
77
+ // start-list
78
+ foreach ($ collection ->listIndexes () as $ indexInfo ) {
79
+ var_dump ($ indexInfo );
80
+ }
81
+ // end-list
82
+
77
83
// start-remove
78
84
$ result = $ collection ->dropIndex ('<index name> ' );
79
85
// end-remove
Original file line number Diff line number Diff line change @@ -186,7 +186,8 @@ The following example creates an Atlas Search index on the specified field:
186
186
List Search Indexes
187
187
~~~~~~~~~~~~~~~~~~~
188
188
189
- The following example prints a list of Atlas Search indexes in the specified collection:
189
+ The following example prints a list of Atlas Search indexes in the
190
+ specified collection:
190
191
191
192
.. literalinclude:: /includes/usage-examples/index-code-examples.php
192
193
:start-after: start-search-list
@@ -244,6 +245,19 @@ The following example creates a text index on the specified string field:
244
245
.. TODO: To learn more about text indexes, see the :ref:`php-text-index`
245
246
.. guide.
246
247
248
+ List Indexes
249
+ ------------
250
+
251
+ The following example prints a list indexes in the
252
+ specified collection:
253
+
254
+ .. literalinclude:: /includes/usage-examples/index-code-examples.php
255
+ :start-after: start-list
256
+ :end-before: end-list
257
+ :language: php
258
+ :copyable:
259
+ :dedent:
260
+
247
261
Delete an Index
248
262
---------------
249
263
You can’t perform that action at this time.
0 commit comments