PHP Trait Sleimanx2\Plastic\Searchable

Afficher le fichier Open project: sleimanx2/plastic

Méthodes publiques

Свойство Type Description
$documentScore null | integer Hit score after querying Elasticsearch.
$documentVersion null | integer Elasticsearch document version.
$isDocument boolean Is indexed in elastic search.

Méthodes publiques

Méthode Description
__call ( string $method, array $parameters ) : mixed Handle dynamic method calls into the model.
bootSearchable ( ) Searchable boot model.
document ( ) : EloquentPersistence Start an elastic persistence query builder.
getDocumentData ( ) : array Build the document data with the appropriate method.
getDocumentIndex ( ) : mixed Get the model elastic index if available.
getDocumentType ( ) : string Get the model elastic type.
shouldSyncDocument ( ) : boolean; Checks if the model content should be auto synced with elastic.

Méthodes protégées

Méthode Description
buildDocumentFromArray ( array $searchable ) : array Build the document from a searchable array.

Method Details

__call() public méthode

Handle dynamic method calls into the model.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
Résultat mixed

bootSearchable() public static méthode

Searchable boot model.
public static bootSearchable ( )

buildDocumentFromArray() protected méthode

Build the document from a searchable array.
protected buildDocumentFromArray ( array $searchable ) : array
$searchable array
Résultat array

document() public méthode

Start an elastic persistence query builder.
public document ( ) : EloquentPersistence
Résultat Sleimanx2\Plastic\Persistence\EloquentPersistence

getDocumentData() public méthode

Build the document data with the appropriate method.
public getDocumentData ( ) : array
Résultat array

getDocumentIndex() public méthode

Get the model elastic index if available.
public getDocumentIndex ( ) : mixed
Résultat mixed

getDocumentType() public méthode

Get the model elastic type.
public getDocumentType ( ) : string
Résultat string

shouldSyncDocument() public méthode

Checks if the model content should be auto synced with elastic.
public shouldSyncDocument ( ) : boolean;
Résultat boolean;

Property Details

$documentScore public_oe property

Hit score after querying Elasticsearch.
public null|int $documentScore
Résultat null | integer

$documentVersion public_oe property

Elasticsearch document version.
public null|int $documentVersion
Résultat null | integer

$isDocument public_oe property

Is indexed in elastic search.
public bool $isDocument
Résultat boolean