Classes/Eel/ElasticSearchQueryBuilder.php
public function suggestions(string $name, array $suggestionDefinition): ElasticSearchQueryBuilder
    {
        $this->request->suggestions($name, $suggestionDefinition);

        return $this;
    }
public function suggestions(string $name, array $suggestionDefinition): ElasticSearchQueryBuilder
    {
        $this->request->suggestions($name, $suggestionDefinition);

        return $this;
    }
public function suggestions ( string $ name , array $ suggestionDefinition ) : ElasticSearchQueryBuilder { $ this -> request -> suggestions ( $ name , $ suggestionDefinition ) ; return $ this ; }
This method is used to create any kind of suggestion.

Example Usage of a term suggestion for the fulltext search

suggestionDefinition = Neos.Fusion:RawArray {
text = "some text"
terms = Neos.Fusion:RawArray {
field = "body"
}
}

nodes = ${Search....suggestion("my-suggestions", this.suggestionDefinition).execute()}

Access all suggestions data with {nodes.suggestions} in your fluid template

@param string $name
@param array $suggestionDefinition
@return ElasticSearchQueryBuilder
This method is used to create any kind of suggestion .