PHP 클래스 Spatie\SearchIndex\SearchIndexHandlers\Elasticsearch

상속: implements Spatie\SearchIndex\SearchIndexHandler
파일 보기 프로젝트 열기: spatie/searchindex 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$elasticsearch Elasticsearch
$indexName string

공개 메소드들

메소드 설명
__construct ( Elasticsearch\Client $elasticsearch )
clearIndex ( ) : mixed Remove everything from the index.
getClient ( ) : Elasticsearch Get the underlying client.
getResults ( array $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.

메소드 상세

__construct() 공개 메소드

public __construct ( Elasticsearch\Client $elasticsearch )
$elasticsearch Elasticsearch\Client

clearIndex() 공개 메소드

Remove everything from the index.
public clearIndex ( ) : mixed
리턴 mixed

getClient() 공개 메소드

Get the underlying client.
public getClient ( ) : Elasticsearch
리턴 Elasticsearch

getResults() 공개 메소드

Get the results for the given query.
public getResults ( array $query ) : mixed
$query array
리턴 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

프로퍼티 상세

$elasticsearch 보호되어 있는 프로퍼티

protected Elasticsearch,Spatie\SearchIndex\SearchIndexHandlers $elasticsearch
리턴 Elasticsearch

$indexName 보호되어 있는 프로퍼티

protected string $indexName
리턴 string