Documentation

CreateSearchIndexes
in package

FinalYes

Operation for the createIndexes command.

Tags
see
Collection::createSearchIndex()
see
Collection::createSearchIndexes()
see
https://mongodb.com/docs/manual/reference/command/createSearchIndexes/

Table of Contents

Properties

$collectionName  : string
$databaseName  : string
$indexes  : array<string|int, mixed>
$options  : array<string|int, mixed>

Methods

__construct()  : mixed
Constructs a createSearchIndexes command.
execute()  : array<string|int, string>
Execute the operation.

Properties

Methods

__construct()

Constructs a createSearchIndexes command.

public __construct(string $databaseName, string $collectionName, array<string|int, array<string|int, mixed>> $indexes, array{comment?: mixed} $options) : mixed
Parameters
$databaseName : string

Database name

$collectionName : string

Collection name

$indexes : array<string|int, array<string|int, mixed>>

List of search index specifications

$options : array{comment?: mixed}

Command options

Tags
throws
InvalidArgumentException

for parameter parsing errors

execute()

Execute the operation.

public execute(Server $server) : array<string|int, string>
Parameters
$server : Server
Tags
throws
UnsupportedException

if write concern is used and unsupported

throws
RuntimeException

for other driver errors (e.g. connection errors)

Return values
array<string|int, string>

The names of the created indexes


        
On this page

Search results