Session: Querying: How to work with suggestions?

Session Query method contains extensions (Suggest) that allow you to use suggestion feature.


SuggestionQueryResult Suggest(
	this IQueryable queryable) { ... }

SuggestionQueryResult Suggest(
	this IQueryable queryable,
	SuggestionQuery query) { ... }
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.


SuggestionQueryResult suggestions = session
	.Query<Employee, Employees_ByFullName>()
		new SuggestionQuery
				Field = "FullName",
				Term = "johne",
				Accuracy = 0.4f,
				MaxSuggestions = 5,
				Distance = StringDistanceTypes.JaroWinkler,
				Popularity = true,