PHP Класс Cake\ElasticSearch\Document

Наследование: implements Cake\Datasource\EntityInterface, use trait Cake\Datasource\EntityTrait
Показать файл Открыть проект

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

Свойство Тип Описание
$_result Elastica\Result Holds an instance of a Result object that's passed into the constructor from a search query. It can contain extra information about this document concerning the search operation, such as highlights, score and version.

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

Метод Описание
__construct ( array | Result $data = [], array $options = [] ) Takes either an array or a Result object form a search and constructs a document representing an entity in a elastic search type,
explanation ( ) : array Returns the explanation array for this document as returned from ElasticSearch.
highlights ( ) : array Returns the highlights array for document as returned by ElasticSearch for the executed query.
type ( ) : string | null Returns the ElasticSearch type name from which this document came from.
version ( ) : integer Returns the version number of this document as returned by ElasticSearch

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

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

Takes either an array or a Result object form a search and constructs a document representing an entity in a elastic search type,
public __construct ( array | Result $data = [], array $options = [] )
$data array | Elastica\Result An array or Result object that represents an Elasticsearch document
$options array An array of options to set the state of the document

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

If this is a new document, or the query used to create it did not ask for explanation, this function will return an empty array.
public explanation ( ) : array
Результат array

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

If this is a new document, or the query used to create it did not ask for highlights, this function will return an empty array.
public highlights ( ) : array
Результат array

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

If this is a new document, this function returns null
public type ( ) : string | null
Результат string | null

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

If this is a new document, this function returns 1
public version ( ) : integer
Результат integer

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

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

Holds an instance of a Result object that's passed into the constructor from a search query. It can contain extra information about this document concerning the search operation, such as highlights, score and version.
protected Result,Elastica $_result
Результат Elastica\Result