PHP Класс Spatie\SearchIndex\SearchIndexHandlers\Algolia

Наследование: implements Spatie\SearchIndex\SearchIndexHandler
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$index AlgoliaSearch\Index

Защищенные свойства (Protected)

Свойство Тип Описание
$algolia AlgoliaSearch\Client

Открытые методы

Метод Описание
__construct ( Client $algolia )
clearIndex ( ) : mixed Remove everything from the index.
getClient ( ) : Client Get the underlying client.
getResults ( string | array | SearchQuery $query ) : mixed Get the results for the given query.
removeFromIndex ( Spatie\SearchIndex\Searchable $subject ) Remove the given subject from the search index.
removeFromIndexByTypeAndId ( string $type, integer $id ) Remove an item from the search index by type and id.
setIndexName ( $indexName ) Set the name of the index that should be used by default.
upsertToIndex ( Spatie\SearchIndex\Searchable | array | Traversabl\Traversable $subject ) Add or update the given searchable subject or array of subjects or Traversable object containing subjects.

Защищенные методы

Метод Описание
getAlgoliaId ( Spatie\SearchIndex\Searchable $subject ) : string Get the id parameter that is used by Algolia as an array.

Описание методов

__construct() публичный Метод

public __construct ( Client $algolia )
$algolia AlgoliaSearch\Client

clearIndex() публичный Метод

Remove everything from the index.
public clearIndex ( ) : mixed
Результат mixed

getAlgoliaId() защищенный Метод

Get the id parameter that is used by Algolia as an array.
protected getAlgoliaId ( Spatie\SearchIndex\Searchable $subject ) : string
$subject Spatie\SearchIndex\Searchable
Результат string

getClient() публичный Метод

Get the underlying client.
public getClient ( ) : Client
Результат AlgoliaSearch\Client

getResults() публичный Метод

Get the results for the given query.
public getResults ( string | array | SearchQuery $query ) : mixed
$query string | array | Spatie\SearchIndex\Query\Algolia\SearchQuery
Результат mixed

removeFromIndex() публичный Метод

Remove the given subject from the search index.
public removeFromIndex ( Spatie\SearchIndex\Searchable $subject )
$subject Spatie\SearchIndex\Searchable

removeFromIndexByTypeAndId() публичный Метод

Remove an item from the search index by type and id.
public removeFromIndexByTypeAndId ( string $type, integer $id )
$type string
$id integer

setIndexName() публичный Метод

Set the name of the index that should be used by default.
public setIndexName ( $indexName )
$indexName

upsertToIndex() публичный Метод

Add or update the given searchable subject or array of subjects or Traversable object containing subjects.
public upsertToIndex ( Spatie\SearchIndex\Searchable | array | Traversabl\Traversable $subject )
$subject Spatie\SearchIndex\Searchable | array | Traversabl\Traversable

Описание свойств

$algolia защищенное свойство

protected Client,AlgoliaSearch $algolia
Результат AlgoliaSearch\Client

$index публичное свойство

public Index,AlgoliaSearch $index
Результат AlgoliaSearch\Index