PHP 클래스 Elastica\Result

Stores all information from a result
저자: Nicolas Ruflin ([email protected])
파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_hit Hit array.

공개 메소드들

메소드 설명
__construct ( array $hit ) Constructs a single results object.
__get ( string $key ) : mixed Magic function to directly access keys inside the result.
__isset ( string $key ) : boolean Magic function to support isset() calls.
getData ( ) : array Returns result data.
getDocument ( ) : Document Returns Document.
getExplanation ( ) : array Returns explanation on how its score was computed.
getFields ( ) : array Returns list of fields.
getHighlights ( ) : array Returns result data.
getHit ( ) : array Returns the raw hit array.
getId ( ) : string Returns the hit id.
getIndex ( ) : string Returns the index name of the result.
getInnerHits ( ) : array Returns inner hits.
getParam ( string $name ) : mixed Returns a param from the result hit array.
getScore ( ) : float Returns the score of the result.
getSource ( ) : array Returns the result source.
getType ( ) : string Returns the type of the result.
getVersion ( ) : string | integer Returns the version information from the hit.
hasFields ( ) : boolean Returns whether result has fields.
hasInnerHits ( ) : boolean Returns whether result has inner hits.
hasParam ( string $name ) : boolean Test if a param from the result hit is set.
setParam ( string $param, mixed $value ) Sets a parameter on the hit.

메소드 상세

__construct() 공개 메소드

Constructs a single results object.
public __construct ( array $hit )
$hit array Hit data

__get() 공개 메소드

Returns null if key does not exist
public __get ( string $key ) : mixed
$key string Key name
리턴 mixed Key value

__isset() 공개 메소드

Magic function to support isset() calls.
public __isset ( string $key ) : boolean
$key string Key name
리턴 boolean

getData() 공개 메소드

Checks for partial result data with getFields, falls back to getSource or both
public getData ( ) : array
리턴 array Result data array

getDocument() 공개 메소드

Returns Document.
public getDocument ( ) : Document
리턴 Document

getExplanation() 공개 메소드

Returns explanation on how its score was computed.
public getExplanation ( ) : array
리턴 array explanations

getFields() 공개 메소드

Returns list of fields.
public getFields ( ) : array
리턴 array Fields list

getHighlights() 공개 메소드

Returns result data.
public getHighlights ( ) : array
리턴 array Result data array

getHit() 공개 메소드

Returns the raw hit array.
public getHit ( ) : array
리턴 array Hit array

getId() 공개 메소드

Returns the hit id.
public getId ( ) : string
리턴 string Hit id

getIndex() 공개 메소드

Returns the index name of the result.
public getIndex ( ) : string
리턴 string Index name

getInnerHits() 공개 메소드

Returns inner hits.
public getInnerHits ( ) : array
리턴 array Fields list

getParam() 공개 메소드

This function can be used to retrieve all data for which a specific function doesn't exist. If the param does not exist, an empty array is returned
public getParam ( string $name ) : mixed
$name string Param name
리턴 mixed Result data

getScore() 공개 메소드

Returns the score of the result.
public getScore ( ) : float
리턴 float Result score

getSource() 공개 메소드

Returns the result source.
public getSource ( ) : array
리턴 array Source data array

getType() 공개 메소드

Returns the type of the result.
public getType ( ) : string
리턴 string Result type

getVersion() 공개 메소드

Returns the version information from the hit.
public getVersion ( ) : string | integer
리턴 string | integer Document version

hasFields() 공개 메소드

Returns whether result has fields.
public hasFields ( ) : boolean
리턴 boolean

hasInnerHits() 공개 메소드

Returns whether result has inner hits.
public hasInnerHits ( ) : boolean
리턴 boolean

hasParam() 공개 메소드

Test if a param from the result hit is set.
public hasParam ( string $name ) : boolean
$name string Param name to test
리턴 boolean True if the param is set, false otherwise

setParam() 공개 메소드

Sets a parameter on the hit.
public setParam ( string $param, mixed $value )
$param string
$value mixed

프로퍼티 상세

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

Hit array.
protected $_hit