By browsing on this website you are agreeing to our 'Terms & Conditions' and the 'Privacy Policy' in regards to your rights and personal data handling.
Suggestion functionality has been merged into RQL. To reflect this change, the Client API has integrated this feature into the session.Query and session.Advanced.DocumentQuery. The following migration samples will focus on the session.Query, the most common and recommended way of interaction with querying capabilities on RavenDB.
Namespaces
3.x
using Raven.Abstractions.Data;
using Raven.Client;
4.0
using Raven.Client.Documents;
using Raven.Client.Documents.Queries.Suggestions;
Example
3.x
SuggestionQueryResult suggestions = session
.Query<Employee, Employees_ByFullName>()
.Suggest(
new SuggestionQuery
{
Field = "FullName",
Term = "johne",
Accuracy = 0.4f,
MaxSuggestions = 5,
Distance = StringDistanceTypes.JaroWinkler,
Popularity = true,
});