Skip to content

Commit be0c54a

Browse files
committed
wip
1 parent a2c7296 commit be0c54a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

source/includes/usage-examples/index-code-examples.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// end-search-create
3030

3131
// start-search-list
32-
foreach ($collection->listIndexes() as $indexInfo) {
32+
foreach ($collection->listSearchIndexes() as $indexInfo) {
3333
var_dump($indexInfo);
3434
}
3535
// end-search-list
@@ -74,6 +74,12 @@
7474
$database->createCollection('<collection name>', $options);
7575
// end-clustered
7676

77+
// start-list
78+
foreach ($collection->listIndexes() as $indexInfo) {
79+
var_dump($indexInfo);
80+
}
81+
// end-list
82+
7783
// start-remove
7884
$result = $collection->dropIndex('<index name>');
7985
// end-remove

source/indexes.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ The following example creates an Atlas Search index on the specified field:
186186
List Search Indexes
187187
~~~~~~~~~~~~~~~~~~~
188188

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:
190191

191192
.. literalinclude:: /includes/usage-examples/index-code-examples.php
192193
:start-after: start-search-list
@@ -244,6 +245,19 @@ The following example creates a text index on the specified string field:
244245
.. TODO: To learn more about text indexes, see the :ref:`php-text-index`
245246
.. guide.
246247

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+
247261
Delete an Index
248262
---------------
249263

0 commit comments

Comments
 (0)