Skip to content

Commit

Permalink
Add indices_boost to query
Browse files Browse the repository at this point in the history
  • Loading branch information
deguif committed Nov 16, 2021
1 parent 220c4c2 commit f21da5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,16 @@ public function setPointInTime(PointInTime $pit): self
return $this->setParam('pit', $pit);
}

/**
* @param array<string, float> $indicesBoost
*
* @see https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multiple-indices.html#index-boost
*/
public function setIndicesBoost(array $indicesBoost): self
{
return $this->setParam('indices_boost', \array_chunk($indicesBoost, 1, true));
}

/**
* Adds a track_total_hits argument.
*
Expand Down

0 comments on commit f21da5b

Please sign in to comment.