Property | Type | Description | |
---|---|---|---|
$ttl |
Method | Description | |
---|---|---|
__construct ( string $name, string $field, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false, boolean $ttl = false ) | ||
getOptions ( ) |
public __construct ( string $name, string $field, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false, boolean $ttl = false ) | ||
$name | string | Index name |
$field | string | Index field, ex: title (ascending), -title (descending) |
$sparse | boolean | Is index sparse? |
$unique | boolean | Is index unique? |
$dropDuplicates | boolean | Drop duplicate documents (only if $unique is used) |
$ttl | boolean | Document TTL (will only work for date and datetime fields) |