PHP Класс Elasticsearch\Bulk

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( elasticsearch\Client $client ) Construct a bulk operation
commit ( ) commit this operation
count ( ) : integer count all pending operations
createPayload ( ) : string create a request payload with all pending operations
delete ( mixed $id = false, string $index, string $type, array $options = [] ) : Bulk delete a document
getOperations ( ) : array get all pending operations
index ( array $document, mixed $id = null, string $index, string $type, array $options = [] ) : Bulk Index a new document or update it if existing
reset ( ) reset this operation
update ( array $partialDocument, mixed $id, string $index, string $type, array $options = [] ) : Bulk Update a part of a document

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

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

Construct a bulk operation
public __construct ( elasticsearch\Client $client )
$client elasticsearch\Client

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

commit this operation
public commit ( )

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

count all pending operations
public count ( ) : integer
Результат integer

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

create a request payload with all pending operations
public createPayload ( ) : string
Результат string

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

delete a document
public delete ( mixed $id = false, string $index, string $type, array $options = [] ) : Bulk
$id mixed
$index string Index
$type string Type
$options array Parameters to pass to delete action
Результат Bulk

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

get all pending operations
public getOperations ( ) : array
Результат array

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

Index a new document or update it if existing
public index ( array $document, mixed $id = null, string $index, string $type, array $options = [] ) : Bulk
$document array
$id mixed Optional
$index string Index
$type string Type
$options array Allow sending query parameters to control indexing further _refresh_ *bool* If set to true, immediately refresh the shard after indexing
Результат Bulk

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

reset this operation
public reset ( )

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

Update a part of a document
public update ( array $partialDocument, mixed $id, string $index, string $type, array $options = [] ) : Bulk
$partialDocument array
$id mixed
$index string Index
$type string Type
$options array Allow sending query parameters to control indexing further _refresh_ *bool* If set to true, immediately refresh the shard after indexing
Результат Bulk