Suggest text must be set either globally or per suggestion.
Parameters
string
$text
Returns
$this
setPrefix()
setPrefix( $prefix) : $this
Suggest prefix must be set either globally or per suggestion.
Parameters
$prefix
Returns
$this
setRegex()
setRegex( $regex) : $this
Suggest regex must be set either globally or per suggestion.
Parameters
$regex
Returns
$this
setRegexOptions()
setRegexOptions(array $value) : $this
Expects one of the next params: max_determinized_states - defaults to 10000,
flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE.
Parameters
array
$value
Returns
$this
setField()
setField(string $field) : $this
Parameters
string
$field
Returns
$this
setSize()
setSize(integer $size) : $this
Parameters
integer
$size
Returns
$this
setShardSize()
setShardSize(integer $size) : $this
Parameters
integer
$size
maximum number of suggestions to be retrieved from each shard
Returns
$this
setName()
setName(string $name) : $this
Sets the name of the suggest. It is automatically set by
the constructor.
Parameters
string
$name
The name of the suggest
Throws
\Elastica\Exception\InvalidException
If name is empty
Returns
$this
getName()
getName() : string
Retrieve the name of this suggestion.
Returns
string
toArray()
toArray() : array
Converts the params to an array. A default implementation exist to create
the an array out of the class name (last part of the class name)
and the params.
Returns
array
—
Filter array
setParam()
setParam(string $key, mixed $value) : $this
Sets (overwrites) the value at the given key.
Parameters
string
$key
Key to set
mixed
$value
Key Value
Returns
$this
setParams()
setParams(array $params) : $this
Sets (overwrites) all params of this object.
Parameters
array
$params
Parameter list
Returns
$this
addParam()
addParam(string $key, mixed $value) : $this
Adds a param to the list.
This function can be used to add an array of params