You are currently browsing legacy 4.1 version of documentation. Click here to switch to the newest 4.2 version.

We can help you with migration to the latest RavenDB

Contact Us Now
see on GitHub

Session: Querying: How to Use Fuzzy

Fuzzy search is supported via fuzzy method. This method is available only from DocumentQuery level and can only be performed on single term values. Because of that it can be used only right after whereEquals method.

Syntax

IDocumentQuery<T> fuzzy(double var1);

Parameters
fuzzy double Value between 0.0 and 1.0 where 1.0 means closer match.

Example

session.advanced().documentQuery(Company.class)
    .whereEquals("Name", "Ernts Hnadel")
    .fuzzy(0.5)
    .toList();
from Companies
where fuzzy(Name = 'Ernts Hnadel', 0.5)