PHP Class Elastica\Suggest\AbstractSuggest

Inheritance: extends Elastica\Param
显示文件 Open project: ruflin/Elastica Class Usage Examples

Protected Properties

Property Type Description
$_name the name of this suggestion

Public Methods

Method Description
__construct ( string $name, string $field )
getName ( ) : string Retrieve the name of this suggestion.
setField ( string $field )
setName ( string $name ) Sets the name of the suggest. It is automatically set by the constructor.
setPrefix ( $prefix ) Suggest prefix must be set either globally or per suggestion.
setRegex ( $regex ) Suggest regex must be set either globally or per suggestion.
setRegexOptions ( array $value ) Expects one of the next params: max_determinized_states - defaults to 10000, flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE.
setShardSize ( integer $size )
setSize ( integer $size )
setText ( string $text ) Suggest text must be set either globally or per suggestion.

Method Details

__construct() public method

public __construct ( string $name, string $field )
$name string
$field string

getName() public method

Retrieve the name of this suggestion.
public getName ( ) : string
return string

setField() public method

public setField ( string $field )
$field string

setName() public method

Sets the name of the suggest. It is automatically set by the constructor.
public setName ( string $name )
$name string The name of the suggest

setPrefix() public method

Suggest prefix must be set either globally or per suggestion.
public setPrefix ( $prefix )

setRegex() public method

Suggest regex must be set either globally or per suggestion.
public setRegex ( $regex )

setRegexOptions() public method

Expects one of the next params: max_determinized_states - defaults to 10000, flags are ALL (default), ANYSTRING, COMPLEMENT, EMPTY, INTERSECTION, INTERVAL, or NONE.
public setRegexOptions ( array $value )
$value array

setShardSize() public method

public setShardSize ( integer $size )
$size integer maximum number of suggestions to be retrieved from each shard

setSize() public method

public setSize ( integer $size )
$size integer

setText() public method

Suggest text must be set either globally or per suggestion.
public setText ( string $text )
$text string

Property Details

$_name protected_oe property

the name of this suggestion
protected $_name