Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add setQuery() shortcut and slices constants to Reindex
Browse files Browse the repository at this point in the history
renanbr committed Jan 25, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 4fb5156 commit 8133fd6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Elastica/Reindex.php
Original file line number Diff line number Diff line change
@@ -30,6 +30,8 @@ class Reindex extends Param
public const SCROLL = 'scroll';
public const REQUESTS_PER_SECOND = 'requests_per_second';
public const PIPELINE = 'pipeline';
public const SLICES = 'slices';
public const SLICES_AUTO = 'auto';

/**
* @var Index
@@ -192,6 +194,11 @@ public function setScript(Script $script)
$this->setParam(self::SCRIPT, $script);
}

public function setQuery(AbstractQuery $query): void
{
$this->setParam(self::QUERY, $query);
}

public function setPipeline(Pipeline $pipeline): void
{
$this->setParam(self::PIPELINE, $pipeline);

0 comments on commit 8133fd6

Please sign in to comment.