* @author Tim Nagel */ class TransformingIndex extends Index { /** * Creates a TransformingSearch instance instead of the default Elastica Search * * @param string $query * @param int|array $options * @return TransformingSearch */ public function createSearch($query = '', $options = null) { $search = new TransformingSearch($this->getClient()); $search->addIndex($this); $search->setOptionsAndQuery($options, $query); return $search; } /** * Returns a type object for the current index with the given name * * @param string $type Type name * @return TransformingType Type object */ public function getType($type) { return new TransformingType($this, $type); } /** * Reassign index name * * While it's technically a regular setter for name property, it's specifically named overrideName, but not setName * since it's used for a very specific case and normally should not be used * * @param string $name Index name */ public function overrideName($name) { $this->_name = $name; } }