PHP 클래스 Cake\ElasticSearch\Document

상속: implements Cake\Datasource\EntityInterface, use trait Cake\Datasource\EntityTrait
파일 보기 프로젝트 열기: cakephp/elastic-search

보호된 프로퍼티들

프로퍼티 타입 설명
$_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