Search code examples
c#ravendbravendb4

RavenDB 4.0 - exact parameter of Where clause


I am trying to play a little bit with RavenDB 4.0 RC. I am migrating from RavenDb 3.0 to the latest version.

The problem I have is extension method IRavenQueryable<T> IQueryable<T>.Where<T>(System.Linq.Expressions.Expression<Func<T, bool>> predicate, bool exact)

What parameter exact actually do? From my investigation when I set that to true RavenDB is not giving me results from the queries along with Index, where part of the query is string comparison.

I couldn't find any documentation of RavenDB 4.0 just yet, so maybe anyone came across that and could give me some explanation of what that parameter is?


Solution

  • The book about RavenDB 4.0 is currently being written, but can be download right now here: https://github.com/ravendb/book/releases/tag/v4.0.9-preview

    In particular, this controls whatever the query will use exact(State = 'abc'). The exact behavior controls how RavenDB will treat the query by default. In this case, unlike the use case insensitive behavior, this will generate a case sensitive match.

    This is applicable only for queries that don't use an index, in which case the definition specified on the index fields take precedence.