PHP 클래스 Elastica\Search

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

보호된 프로퍼티들

프로퍼티 타입 설명
$_client Client Client object.
$_indices array Array of indices.
$_options array
$_query Query
$_types array Array of types.

공개 메소드들

메소드 설명
__construct ( Client $client, Elastica\ResultSet\BuilderInterface $builder = null ) Constructs search object.
addIndex ( Index | string $index ) Adds a index to the list.
addIndices ( array $indices = [] ) Add array of indices at once.
addOption ( string $key, mixed $value )
addType ( Type | string $type ) Adds a type to the current search.
addTypes ( array $types = [] ) Add array of types.
clearOptions ( )
count ( mixed $query = '', $fullResult = false ) : integer | ResultSet
create ( elastica\SearchableInterface $searchObject ) : Search Creates new search object.
getClient ( ) : Client Return client object.
getIndices ( ) : array Return array of indices.
getOption ( string $key ) : mixed
getOptions ( ) : array
getPath ( ) : string Combines indices and types to the search request path.
getQuery ( ) : Query
getResultSetBuilder ( ) : Elastica\ResultSet\BuilderInterface
getTypes ( ) : array Return array of types.
hasIndex ( Index | string $index ) : boolean
hasIndices ( ) : boolean
hasOption ( string $key ) : boolean
hasType ( Type | string $type ) : boolean
hasTypes ( ) : boolean
scroll ( string $expiryTime = '1m' ) : Scroll Returns the Scroll Iterator.
search ( mixed $query = '', integer | array $options = null ) : ResultSet Search in the set indices, types.
setOption ( string $key, mixed $value )
setOptions ( array $options )
setOptionsAndQuery ( array | integer $options = null, string | array | Query $query = '' )
setQuery ( string | array | Query | Elastica\Suggest | Elastica\Query\AbstractQuery $query )
setSuggest ( elastica\Suggest $suggest )

보호된 메소드들

메소드 설명
_validateOption ( string $key ) : boolean

메소드 상세

__construct() 공개 메소드

Constructs search object.
public __construct ( Client $client, Elastica\ResultSet\BuilderInterface $builder = null )
$client Client Client object
$builder Elastica\ResultSet\BuilderInterface

_validateOption() 보호된 메소드

protected _validateOption ( string $key ) : boolean
$key string
리턴 boolean

addIndex() 공개 메소드

Adds a index to the list.
public addIndex ( Index | string $index )
$index Index | string Index object or string

addIndices() 공개 메소드

Add array of indices at once.
public addIndices ( array $indices = [] )
$indices array

addOption() 공개 메소드

public addOption ( string $key, mixed $value )
$key string
$value mixed

addType() 공개 메소드

Adds a type to the current search.
public addType ( Type | string $type )
$type Type | string Type name or object

addTypes() 공개 메소드

Add array of types.
public addTypes ( array $types = [] )
$types array

clearOptions() 공개 메소드

public clearOptions ( )

count() 공개 메소드

public count ( mixed $query = '', $fullResult = false ) : integer | ResultSet
$query mixed
$fullResult (default = false) By default only the total hit count is returned. If set to true, the full ResultSet including aggregations is returned
리턴 integer | ResultSet

create() 공개 정적인 메소드

Creates new search object.
public static create ( elastica\SearchableInterface $searchObject ) : Search
$searchObject elastica\SearchableInterface
리턴 Search

getClient() 공개 메소드

Return client object.
public getClient ( ) : Client
리턴 Client Client object

getIndices() 공개 메소드

Return array of indices.
public getIndices ( ) : array
리턴 array List of index names

getOption() 공개 메소드

public getOption ( string $key ) : mixed
$key string
리턴 mixed

getOptions() 공개 메소드

public getOptions ( ) : array
리턴 array

getPath() 공개 메소드

Combines indices and types to the search request path.
public getPath ( ) : string
리턴 string Search path

getQuery() 공개 메소드

public getQuery ( ) : Query
리턴 Query

getResultSetBuilder() 공개 메소드

public getResultSetBuilder ( ) : Elastica\ResultSet\BuilderInterface
리턴 Elastica\ResultSet\BuilderInterface

getTypes() 공개 메소드

Return array of types.
public getTypes ( ) : array
리턴 array List of types

hasIndex() 공개 메소드

public hasIndex ( Index | string $index ) : boolean
$index Index | string
리턴 boolean

hasIndices() 공개 메소드

public hasIndices ( ) : boolean
리턴 boolean

hasOption() 공개 메소드

public hasOption ( string $key ) : boolean
$key string
리턴 boolean

hasType() 공개 메소드

public hasType ( Type | string $type ) : boolean
$type Type | string
리턴 boolean

hasTypes() 공개 메소드

public hasTypes ( ) : boolean
리턴 boolean

scroll() 공개 메소드

Returns the Scroll Iterator.
또한 보기: Elastica\Scroll
public scroll ( string $expiryTime = '1m' ) : Scroll
$expiryTime string
리턴 Scroll

setOption() 공개 메소드

public setOption ( string $key, mixed $value )
$key string
$value mixed

setOptions() 공개 메소드

public setOptions ( array $options )
$options array

setOptionsAndQuery() 공개 메소드

public setOptionsAndQuery ( array | integer $options = null, string | array | Query $query = '' )
$options array | integer
$query string | array | Query

setQuery() 공개 메소드

public setQuery ( string | array | Query | Elastica\Suggest | Elastica\Query\AbstractQuery $query )
$query string | array | Query | Elastica\Suggest | Elastica\Query\AbstractQuery

setSuggest() 공개 메소드

public setSuggest ( elastica\Suggest $suggest )
$suggest elastica\Suggest

프로퍼티 상세

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

Client object.
protected Client,Elastica $_client
리턴 Client

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

Array of indices.
protected array $_indices
리턴 array

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

protected array $_options
리턴 array

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

protected Query,Elastica $_query
리턴 Query

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

Array of types.
protected array $_types
리턴 array