\Elastica\ToolCrossIndex

Functions to move documents and types between indices.

Summary

Methods
Properties
Constants
reindex()
copy()
No public properties found
OPTION_TYPE
OPTION_QUERY
OPTION_EXPIRY_TIME
OPTION_SIZE_PER_SHARD
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

OPTION_TYPE

OPTION_TYPE

Type option.

type: string | string[] | \Elastica\Type | \Elastica\Type[] | null default: null (means all types)

OPTION_QUERY

OPTION_QUERY

Query option.

type: see \Elastica\Query::create() default: Elastica\Query\MatchAll

OPTION_EXPIRY_TIME

OPTION_EXPIRY_TIME

Expiry time option.

type: string (see Elastica\ScanAndScroll) default: '1m'

OPTION_SIZE_PER_SHARD

OPTION_SIZE_PER_SHARD

Size per shard option.

type: int (see Elastica\ScanAndScroll) default: 1000

Methods

reindex()

reindex(\Elastica\Index  $oldIndex, \Elastica\Index  $newIndex, array  $options = array()) : \Elastica\Index

Reindex documents from an old index to a new index.

Parameters

\Elastica\Index $oldIndex
\Elastica\Index $newIndex
array $options

keys: CrossIndex::OPTION_* constants

Returns

\Elastica\Index

The new index object

copy()

copy(\Elastica\Index  $oldIndex, \Elastica\Index  $newIndex, array  $options = array()) : \Elastica\Index

Copies type mappings and documents from an old index to a new index.

Parameters

\Elastica\Index $oldIndex
\Elastica\Index $newIndex
array $options

keys: CrossIndex::OPTION_* constants

Returns

\Elastica\Index

The new index object