PHP 클래스 Elastica\Type\Mapping

파일 보기 프로젝트 열기: ruflin/elastica 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_mapping Mapping.
$_type Type.

공개 메소드들

메소드 설명
__construct ( Type $type = null, array $properties = [] ) Construct Mapping.
create ( array | Mapping $mapping ) : self Creates a mapping object.
disableSource ( boolean $enabled = false ) Disables the source in the index.
enableAllField ( boolean $enabled = true ) Enables the "_all" field.
enableTtl ( boolean $enabled = true ) Enables TTL for all documents in this type.
getParam ( string $key ) : mixed Get raw parameters.
getProperties ( ) : array Gets the mapping properties.
getType ( ) : Type Returns mapping type.
send ( array $query = [] ) : Response Submits the mapping and sends it to the server.
setAllField ( array $params ) Sets params for the "_all" field.
setMeta ( array $meta ) Sets the mapping _meta.
setParam ( string $key, mixed $value ) Sets raw parameters.
setParent ( string $type ) Set parent type.
setProperties ( array $properties ) Sets the mapping properties.
setSource ( array $source ) Sets source values.
setTtl ( array $params ) Set TTL.
setType ( Type $type ) Sets the mapping type Enter description here .
toArray ( ) : array Converts the mapping to an array.

메소드 상세

__construct() 공개 메소드

Construct Mapping.
public __construct ( Type $type = null, array $properties = [] )
$type Elastica\Type OPTIONAL Type object
$properties array OPTIONAL Properties

create() 공개 정적인 메소드

Creates a mapping object.
public static create ( array | Mapping $mapping ) : self
$mapping array | Mapping Mapping object or properties array
리턴 self

disableSource() 공개 메소드

Param can be set to true to enable again
public disableSource ( boolean $enabled = false )
$enabled boolean OPTIONAL (default = false)

enableAllField() 공개 메소드

Enables the "_all" field.
public enableAllField ( boolean $enabled = true )
$enabled boolean OPTIONAL (default = true)

enableTtl() 공개 메소드

Enables TTL for all documents in this type.
public enableTtl ( boolean $enabled = true )
$enabled boolean OPTIONAL (default = true)

getParam() 공개 메소드

Get raw parameters.
또한 보기: setParam
public getParam ( string $key ) : mixed
$key string Key name
리턴 mixed $value Key value

getProperties() 공개 메소드

Gets the mapping properties.
public getProperties ( ) : array
리턴 array $properties Properties

getType() 공개 메소드

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

send() 공개 메소드

Submits the mapping and sends it to the server.
public send ( array $query = [] ) : Response
$query array Query string parameters to send with mapping
리턴 Elastica\Response Response object

setAllField() 공개 메소드

Sets params for the "_all" field.
public setAllField ( array $params )
$params array _all Params (enabled, store, term_vector, analyzer)

setMeta() 공개 메소드

Sets the mapping _meta.
public setMeta ( array $meta )
$meta array metadata

setParam() 공개 메소드

Possible options: _uid _id _type _source _all _analyzer _boost _parent _routing _index _size properties
public setParam ( string $key, mixed $value )
$key string Key name
$value mixed Key value

setParent() 공개 메소드

Set parent type.
public setParent ( string $type )
$type string Parent type

setProperties() 공개 메소드

Sets the mapping properties.
public setProperties ( array $properties )
$properties array Properties

setSource() 공개 메소드

To disable source, argument is array('enabled' => false)
public setSource ( array $source )
$source array Source array

setTtl() 공개 메소드

Set TTL.
public setTtl ( array $params )
$params array TTL Params (enabled, default, ...)

setType() 공개 메소드

..
public setType ( Type $type )
$type Elastica\Type Type object

toArray() 공개 메소드

Converts the mapping to an array.
public toArray ( ) : array
리턴 array Mapping as array

프로퍼티 상세

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

Mapping.
protected $_mapping

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

Type.
protected $_type