$values */ public function __construct( private array $values, private float $boost = 1.0, ) { if ($values === []) { throw new \Spameri\ElasticQuery\Exception\InvalidArgumentException( 'Ids query must contain at least one id.', ); } } public function key(): string { return 'ids_' . \implode('-', $this->values); } /** * @return array> */ public function toArray(): array { return [ 'ids' => [ 'values' => $this->values, 'boost' => $this->boost, ], ]; } }