see on GitHub

Session: Querying: How to work with suggestions?

Session query allows you to use suggestion feature.

Syntax

public SuggestionQueryResult suggest();

public SuggestionQueryResult suggest(SuggestionQuery query);

Parameters
query SuggestionQuery A suggestion query definition containing all information required to query a specified index.
Return Value
SuggestionQueryResult Result containing array of all suggestions for executed query.

Example

SuggestionQuery suggestionQuery = new SuggestionQuery("FullName", "johne");
suggestionQuery.setAccuracy(0.4f);
suggestionQuery.setMaxSuggestions(5);
suggestionQuery.setDistance(StringDistanceTypes.JARO_WINKLER);
suggestionQuery.setPopularity(true);
SuggestionQueryResult suggestions = session
  .query(Employee.class, Employees_ByFullName.class)
  .suggest();