Skip to content

Commit a7f7552

Browse files
committed
Clean ListSearchIndex
1 parent d84420a commit a7f7552

File tree

5 files changed

+57
-315
lines changed

5 files changed

+57
-315
lines changed

src/Collection.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,17 +1003,18 @@ public function listIndexes(array $options = [])
10031003
* Returns information for all indexes for the collection.
10041004
*
10051005
* @see ListSearchIndexes::__construct() for supported aggregation and list options
1006-
* @return IndexInfoIterator
1006+
* @return Traversable
10071007
* @throws InvalidArgumentException for parameter/option parsing errors
10081008
* @throws DriverRuntimeException for other driver errors (e.g. connection errors)
10091009
*/
1010-
public function listSearchIndexes(string $name, array $aggregationOptions = [], array $listIndexOptions = [])
1010+
public function listSearchIndexes(string $name, array $aggregationOptions = [], array $listIndexOptions = []): Traversable
10111011
{
1012+
$filter = [];
10121013
if ($name) {
1013-
$listIndexOptions += ['name' => $name];
1014+
$filter += ['name' => $name];
10141015
}
10151016

1016-
$operation = new ListSearchIndexes($this->databaseName, $this->collectionName, $aggregationOptions, $listIndexOptions);
1017+
$operation = new ListSearchIndexes($this->databaseName, $this->collectionName, $filter, $aggregationOptions + $listIndexOptions);
10171018
$server = select_server($this->manager, $listIndexOptions);
10181019

10191020
return $operation->execute($server);

src/Model/SearchIndexInfo.php

Lines changed: 0 additions & 155 deletions
This file was deleted.

src/Model/SearchIndexInfoIterator.php

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/Model/SearchIndexInfoIteratorIterator.php

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)