Classes/Eel/ElasticSearchQueryBuilder.php
public function termSuggestions(string $text, string $field = '_all', string $name = 'suggestions'): ElasticSearchQueryBuilder
    {
        $suggestionDefinition = [
            'text' => $text,
            'term' => [
                'field' => $field
            ]
        ];

        $this->suggestions($name, $suggestionDefinition);

        return $this;
    }
public function termSuggestions(string $text, string $field = '_all', string $name = 'suggestions'): ElasticSearchQueryBuilder
    {
        $suggestionDefinition = [
            'text' => $text,
            'term' => [
                'field' => $field
            ]
        ];

        $this->suggestions($name, $suggestionDefinition);

        return $this;
    }
public function termSuggestions ( string $ text , string $ field = '_all' , string $ name = 'suggestions' ) : ElasticSearchQueryBuilder { $ suggestionDefinition = [ 'text' => $ text , 'term' => [ 'field' => $ field ] ] ; $ this -> suggestions ( $ name , $ suggestionDefinition ) ; return $ this ; }
This method is used to create a simple term suggestion.

Example Usage of a term suggestion

nodes = ${Search....termSuggestions("aTerm")}

Access all suggestions data with ${Search....getSuggestions()}

@param string $text
@param string $field
@param string $name
@return ElasticSearchQueryBuilder
This method is used to create a simple term suggestion .