PHP 클래스 Elastica\ResultSet

List of all hits that are returned for a search on elasticsearch Result set implements iterator
저자: Nicolas Ruflin ([email protected])
상속: implements Iterator, implements Countable, implements ArrayAccess
파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Response $response, Query $query, Result[] $results ) Constructs ResultSet object.
count ( ) : integer Returns size of current set.
countSuggests ( ) : integer Returns size of current suggests.
current ( ) : Result | boolean Returns the current object of the set.
getAggregation ( string $name ) : array Retrieve a specific aggregation from this result set.
getAggregations ( ) : array Returns all aggregation results.
getDocuments ( ) : array Returns all Documents.
getMaxScore ( ) : float Returns the max score of the results found.
getQuery ( ) : Query
getResponse ( ) : Response Returns response object.
getResults ( ) : Result[] Returns all results.
getSuggests ( ) : array Return all suggests.
getTotalHits ( ) : integer Returns the total number of found hits.
getTotalTime ( ) : integer Returns the total number of ms for this search to complete.
hasAggregations ( ) : boolean Returns whether aggregations exist.
hasSuggests ( ) : boolean Returns true if the response contains suggestion results; false otherwise.
hasTimedOut ( ) : boolean Returns true if the query has timed out.
key ( ) : integer Returns the position of the current entry.
next ( ) Sets pointer (current) to the next item of the set.
offsetExists ( integer $offset ) : boolean Whether a offset exists.
offsetGet ( integer $offset ) : Result | null Offset to retrieve.
offsetSet ( integer $offset, Result $value ) Offset to set.
offsetUnset ( integer $offset ) Offset to unset.
rewind ( ) Resets position to 0, restarts iterator.
valid ( ) : boolean Check if an object exists at the current position.

메소드 상세

__construct() 공개 메소드

Constructs ResultSet object.
public __construct ( Response $response, Query $query, Result[] $results )
$response Response Response object
$query Query Query object
$results Result[]

count() 공개 메소드

Returns size of current set.
public count ( ) : integer
리턴 integer Size of set

countSuggests() 공개 메소드

Returns size of current suggests.
public countSuggests ( ) : integer
리턴 integer Size of suggests

current() 공개 메소드

Returns the current object of the set.
public current ( ) : Result | boolean
리턴 Result | boolean Set object or false if not valid (no more entries)

getAggregation() 공개 메소드

Retrieve a specific aggregation from this result set.
public getAggregation ( string $name ) : array
$name string the name of the desired aggregation
리턴 array

getAggregations() 공개 메소드

Returns all aggregation results.
public getAggregations ( ) : array
리턴 array

getDocuments() 공개 메소드

Returns all Documents.
public getDocuments ( ) : array
리턴 array Documents \Elastica\Document

getMaxScore() 공개 메소드

Returns the max score of the results found.
public getMaxScore ( ) : float
리턴 float Max Score

getQuery() 공개 메소드

public getQuery ( ) : Query
리턴 Query

getResponse() 공개 메소드

Returns response object.
public getResponse ( ) : Response
리턴 Response Response object

getResults() 공개 메소드

Returns all results.
public getResults ( ) : Result[]
리턴 Result[] Results

getSuggests() 공개 메소드

Return all suggests.
public getSuggests ( ) : array
리턴 array suggest results

getTotalHits() 공개 메소드

Returns the total number of found hits.
public getTotalHits ( ) : integer
리턴 integer Total hits

getTotalTime() 공개 메소드

Returns the total number of ms for this search to complete.
public getTotalTime ( ) : integer
리턴 integer Total time

hasAggregations() 공개 메소드

Returns whether aggregations exist.
public hasAggregations ( ) : boolean
리턴 boolean Aggregation existence

hasSuggests() 공개 메소드

Returns true if the response contains suggestion results; false otherwise.
public hasSuggests ( ) : boolean
리턴 boolean

hasTimedOut() 공개 메소드

Returns true if the query has timed out.
public hasTimedOut ( ) : boolean
리턴 boolean Timed out

key() 공개 메소드

Returns the position of the current entry.
public key ( ) : integer
리턴 integer Current position

next() 공개 메소드

Sets pointer (current) to the next item of the set.
public next ( )

offsetExists() 공개 메소드

Whether a offset exists.
public offsetExists ( integer $offset ) : boolean
$offset integer
리턴 boolean true on success or false on failure.

offsetGet() 공개 메소드

Offset to retrieve.
public offsetGet ( integer $offset ) : Result | null
$offset integer
리턴 Result | null

offsetSet() 공개 메소드

Offset to set.
public offsetSet ( integer $offset, Result $value )
$offset integer
$value Result

offsetUnset() 공개 메소드

Offset to unset.
public offsetUnset ( integer $offset )
$offset integer

rewind() 공개 메소드

Resets position to 0, restarts iterator.
public rewind ( )

valid() 공개 메소드

Check if an object exists at the current position.
public valid ( ) : boolean
리턴 boolean True if object exists