field . '_' . $this->queryString; } /** * @return array>> */ public function toArray(): array { $body = [ 'query' => $this->queryString, 'boost' => $this->boost, 'slop' => $this->slop, ]; if ($this->analyzer !== null) { $body['analyzer'] = $this->analyzer; } if ($this->maxExpansions !== null) { $body['max_expansions'] = $this->maxExpansions; } if ($this->zeroTermsQuery !== null) { $body['zero_terms_query'] = $this->zeroTermsQuery; } return [ 'match_phrase_prefix' => [ $this->field => $body, ], ]; } }