Menu

## IndexInterface extends JsonSerializable
in

IndexInterface.php : 14

Interface IndexInterface

##### Tags

author

  Lucas S. Vieira

### Table of Contents

#### Methods

getCollection() : Collection|null
  Returns the collection where the index belongs to
getCreateData() : array<string|int, mixed>
  Return data for create index on server
getId() : string
  Returns the index id
getName() : string
  Returns the index name
getType() : string
  Returns the index type
isNew() : bool
  If the index is a new one
isSparse() : bool
  If index is sparse
isUnique() : bool
  If index was set to use 'unique' constraint

### Methods

#### getCollection()

IndexInterface.php : 70

Returns the collection where the index belongs to

`public getCollection() : Collection|null`

##### Return values

Collection|null —

A collection object or null if the index was not set to an collection yet

#### getCreateData()

IndexInterface.php : 63

Return data for create index on server

`public getCreateData() : array<string|int, mixed>`

##### Return values

array<string|int, mixed>

#### getId()

IndexInterface.php : 42

Returns the index id

`public getId() : string`

##### Return values

string

#### getName()

IndexInterface.php : 49

Returns the index name

`public getName() : string`

##### Return values

string

#### getType()

IndexInterface.php : 56

Returns the index type

`public getType() : string`

##### Return values

string

#### isNew()

IndexInterface.php : 21

If the index is a new one

`public isNew() : bool`

##### Return values

bool —

True for new one index. False for a existing index.

#### isSparse()

IndexInterface.php : 35

If index is sparse

`public isSparse() : bool`

##### Return values

bool

#### isUnique()

IndexInterface.php : 28

If index was set to use 'unique' constraint

`public isUnique() : bool`

##### Return values

bool

## Search results