PHP Класс ElasticSearch\Transport\Base

(c) Raymond Julin For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$host string What host to connect to for server
$index string ElasticSearch index
$port integer Port to connect on
$type string ElasticSearch document type

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

Метод Описание
__construct ( string $host, integer $port ) Default constructor, just set host and port
delete ( mixed $id = false ) Delete a document by its id
deleteByQuery ( mixed $query, array $options = [] ) : array Search
index ( array | object $document, mixed $id = false, array $options = [] ) Method for indexing a new document
request ( string | array $path, string $method = "GET", array | boolean $payload = false ) Perform a request against the given path/method/payload combination Example: $es->request('/_status');
search ( array | string $query ) Perform a search based on query
setIndex ( string $index ) Set what index to act against
setType ( string $type ) Set what document types to act against
update ( array | object $partialDocument, mixed $id, array $options = [] ) Method for updating a document

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

Метод Описание
buildUrl ( array | boolean $path = false, array $options = [] ) : string Build a callable url

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

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

Default constructor, just set host and port
public __construct ( string $host, integer $port )
$host string
$port integer

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

Build a callable url
protected buildUrl ( array | boolean $path = false, array $options = [] ) : string
$path array | boolean
$options array Query parameter options to pass
Результат string

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

Delete a document by its id
abstract public delete ( mixed $id = false )
$id mixed

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

Search
public deleteByQuery ( mixed $query, array $options = [] ) : array
$query mixed String or array to use as criteria for delete
$options array Parameters to pass to delete action
Результат array

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

Method for indexing a new document
abstract public index ( array | object $document, mixed $id = false, array $options = [] )
$document array | object
$id mixed
$options array

request() абстрактный публичный Метод

Perform a request against the given path/method/payload combination Example: $es->request('/_status');
abstract public request ( string | array $path, string $method = "GET", array | boolean $payload = false )
$path string | array
$method string
$payload array | boolean

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

Set what index to act against
public setIndex ( string $index )
$index string

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

Set what document types to act against
public setType ( string $type )
$type string

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

Method for updating a document
abstract public update ( array | object $partialDocument, mixed $id, array $options = [] )
$partialDocument array | object
$id mixed
$options array

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

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

What host to connect to for server
protected string $host
Результат string

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

ElasticSearch index
protected string $index
Результат string

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

Port to connect on
protected int $port
Результат integer

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

ElasticSearch document type
protected string $type
Результат string