boost = $boost; return $this; } public function analyzer(string $analyzer) { $this->analyzer = $analyzer; return $this; } public function __construct( protected array $fields, protected string $value ) { } public function toArray(): array { return [ 'simple_query_string' => [ 'query' => $this->value, 'fields' => $this->fields, 'analyzer' => $this->analyzer, 'default_operator' => 'AND', 'boost' => $this->boost ] ]; } }