field . '_' . $this->query; } /** * @return array>> */ public function toArray(): array { $body = [ 'value' => $this->query, 'boost' => $this->boost, ]; if ($this->flags !== null) { $body['flags'] = $this->flags; } if ($this->caseInsensitive !== null) { $body['case_insensitive'] = $this->caseInsensitive; } if ($this->maxDeterminizedStates !== null) { $body['max_determinized_states'] = $this->maxDeterminizedStates; } if ($this->rewrite !== null) { $body['rewrite'] = $this->rewrite; } return [ 'regexp' => [ $this->field => $body, ], ]; } }