PHP 클래스 Elastica\Type\AbstractType

This abstract model should help creating search index and a subtype with some easy config entries that are overloaded. The following variables have to be set: - $_indexName - $_typeName The following variables can be set for additional configuration - $_mapping: Value type mapping for the given type - $_indexParams: Parameters for the index
저자: Nicolas Ruflin ([email protected])
상속: implements Elastica\SearchableInterface
파일 보기 프로젝트 열기: ruflin/elastica

보호된 프로퍼티들

프로퍼티 타입 설명
$_client Client.
$_index Index.
$_indexName Index name.
$_indexParams Index params.
$_mapping Mapping.
$_source Source.
$_type Type.
$_typeName Index name.

공개 메소드들

메소드 설명
__construct ( Client $client = null ) Creates index object with client connection.
convertDate ( integer $date ) : string Converts given time to format: 1995-12-31T23:59:59Z.
count ( string | array | Query $query = '' ) : integer Count docs in the type based on query.
create ( boolean $recreate = false ) Creates the index and sets the mapping for this type.
createSearch ( string | Query $query = '', array | integer $options = null ) : Search
getIndex ( ) : Index Returns the search index.
getType ( ) : Type Returns type object.
search ( string | array | Query $query = '', null $options = null ) : ResultSet Search on the type.

메소드 상세

__construct() 공개 메소드

Reads index and type name from protected vars _indexName and _typeName. Has to be set in child class
public __construct ( Client $client = null )
$client Elastica\Client OPTIONAL Client object

convertDate() 공개 메소드

This is the lucene date format
public convertDate ( integer $date ) : string
$date integer Date input (could be string etc.) -> must be supported by strtotime
리턴 string Converted date string

count() 공개 메소드

Count docs in the type based on query.
또한 보기: Elastica\SearchableInterface::count
public count ( string | array | Query $query = '' ) : integer
$query string | array | Elastica\Query Array with all query data inside or a Elastica\Query object
리턴 integer number of documents matching the query

create() 공개 메소드

Creates the index and sets the mapping for this type.
public create ( boolean $recreate = false )
$recreate boolean OPTIONAL Recreates the index if true (default = false)

createSearch() 공개 메소드

public createSearch ( string | Query $query = '', array | integer $options = null ) : Search
$query string | Elastica\Query
$options array | integer
리턴 Elastica\Search

getIndex() 공개 메소드

Returns the search index.
public getIndex ( ) : Index
리턴 Elastica\Index Index object

getType() 공개 메소드

Returns type object.
public getType ( ) : Type
리턴 Elastica\Type Type object

프로퍼티 상세

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

Client.
protected $_client

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

Index.
protected $_index

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

Index name.
protected $_indexName

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

Index params.
protected $_indexParams

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

Mapping.
protected $_mapping

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

Source.
protected $_source

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

Type.
protected $_type

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

Index name.
protected $_typeName