for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Elastica\Processor;
/**
* Elastica Foreach Processor.
*
* @author Federico Panini <[email protected]>
* @author Thibaut Simon-Fine <[email protected]>
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/foreach-processor.html
*/
class ForeachProcessor extends AbstractProcessor
{
public const DEFAULT_IGNORE_MISSING_VALUE = false;
protected const PROCESSOR_NAME = 'foreach';
* Set field.
* @return $this
public function setField(string $field): self
return $this->setParam('field', $field);
}
* Set processor.
* @param AbstractProcessor
public function setProcessor(AbstractProcessor $processor): self
return $this->setParam('processor', $processor);
* Set raw processor.
* Example : ['remove' => ['field' => 'user_agent']].
public function setRawProcessor(array $processor): self
* Set ignore_missing. Default value false.
* If true and field does not exist or is null, the processor quietly exits without modifying the document
public function setIgnoreMissing(bool $ignoreMissing): self
return $this->setParam('ignore_missing', $ignoreMissing);
* Param's name
* Picks the last part of the class name and makes it snake_case
* You can override this method if you want to change the name.
* @return string name
protected function _getBaseName()
return self::PROCESSOR_NAME;