PHP Class Sleimanx2\Plastic\DSL\SuggestionBuilder

Afficher le fichier Open project: sleimanx2/plastic

Méthodes publiques

Свойство Type Description
$index string The elastic index to query against.
$query ONGR\ElasticsearchDSL\Search An instance of DSL query.

Méthodes publiques

Méthode Description
__construct ( Connection $connection, ONGR\ElasticsearchDSL\Search $query = null ) Builder constructor.
append ( $suggestion ) Append a suggestion to query.
completion ( $name, $text, array $parameters = [] ) Add a completion suggestion.
get ( ) : array Execute the suggest query against elastic and return the raw result if model not set.
getConnection ( ) : Connection Returns the connection instance.
getIndex ( ) : string Return the current elastic index.
index ( string $index ) Set the elastic index to query against.
term ( string $name, string $text, array $parameters = [] ) Add a term suggestion.
toDSL ( ) : array Return the DSL query.

Method Details

__construct() public méthode

Builder constructor.
public __construct ( Connection $connection, ONGR\ElasticsearchDSL\Search $query = null )
$connection Sleimanx2\Plastic\Connection
$query ONGR\ElasticsearchDSL\Search

append() public méthode

Append a suggestion to query.
public append ( $suggestion )
$suggestion

completion() public méthode

Add a completion suggestion.
public completion ( $name, $text, array $parameters = [] )
$name
$text
$parameters array

get() public méthode

Execute the suggest query against elastic and return the raw result if model not set.
public get ( ) : array
Résultat array

getConnection() public méthode

Returns the connection instance.
public getConnection ( ) : Connection
Résultat Sleimanx2\Plastic\Connection

getIndex() public méthode

Return the current elastic index.
public getIndex ( ) : string
Résultat string

index() public méthode

Set the elastic index to query against.
public index ( string $index )
$index string

term() public méthode

Add a term suggestion.
public term ( string $name, string $text, array $parameters = [] )
$name string
$text string
$parameters array

toDSL() public méthode

Return the DSL query.
public toDSL ( ) : array
Résultat array

Property Details

$index public_oe property

The elastic index to query against.
public string $index
Résultat string

$query public_oe property

An instance of DSL query.
public Search,ONGR\ElasticsearchDSL $query
Résultat ONGR\ElasticsearchDSL\Search