ElasticsearchDocument

Extends \ElasticsearchModel

Document model

link

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-get.html

link

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search.html

link

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-index_.html

link

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete.html

package

ElasticsearchSource

subpackage

Model

Methods

Handle scroll search

_handleScrollFind(string $type, array &$query) 

Arguments

$type

string

$query

array

Put ids in right place in case of multiple ids

_mapMultipleIds(array &$queryData) 

Arguments

$queryData

array

{@inheritdoc}

beforeFind(array $queryData) : array

Arguments

$queryData

array

Response

array

{@inheritdoc} With index/type support

beforeSave(array $options = array()) : boolean

Arguments

$options

array

Response

boolean

{@inheritdoc} With index/type support

delete(integer|string $id = null, boolean $cascade = true) : boolean

Arguments

$id

integer|string

ID of record to delete

$cascade

boolean

Set to true to delete records that depend on this record

Response

boolean

True on success

{@inheritdoc}

deleteAll(mixed $conditions, boolean $cascade = true, boolean $callbacks = false) : boolean

Arguments

$conditions

mixed

Conditions to match

$cascade

boolean

Set to true to delete records that depend on this record (NOT USED)

$callbacks

boolean

Run callbacks (NOT USED)

Response

boolean

True on success, false on failure

{@inheritdoc}

exists(mixed $id = null, array $conditions = array(), boolean $force = false) : boolean

Arguments

$id

mixed

$conditions

array

$force

boolean

Response

boolean

Runs an explain on a query

explainQuery(string $connection, string $query) : array

Arguments

$connection

string

Connection name

$query

string

RAW query to explain / find query plan for.

Response

array

Array of explain information or empty array if connection is unsupported.

{@inheritdoc}

find(string $type = 'first', array $query = array()) 

Arguments

$type

string

$query

array

{@inheritdoc} With index/type support

setSource(string $tableName, string $indexName = null, string $typeName = null) 
throws

when database table $tableName is not found on data source

Arguments

$tableName

string

$indexName

string

$typeName

string

Properties

{@inheritdoc}

name : string
inherited
var

Type(s)

string

{@inheritdoc}

useTable : string
var

Type(s)

string

Elasticsearch index

useIndex : string
var

Type(s)

string

Elasticsearch index type

useType : string
var

Type(s)

string

{@inheritdoc}

useDbConfig : string
inherited
var

Type(s)

string