I'm using such a query:
var query = "*" + QueryParser.Escape(input) + "*";
session.Query<User, UsersByEmailAndName>().Where(x => x.Email.In(query) || x.DisplayName.In(query));
With the support of a simple index:
public UsersByEmailAndName()
{
Map = users => from user in users
select new
{
user.Email,
user.DisplayName,
};
}
Here I've read that:
"By default, RavenDB uses a custom analyzer called LowerCaseKeywordAnalyzer for all content. (...) The default values for each field are FieldStorage.No in Stores and FieldIndexing.Default in Indexes."
The index contains fields:
DisplayName - "jarek waliszko"
and Email - "my_email@domain.com"
And finally the thing is:
If the query
is something like *_email@*
or *ali*
the result is fine. But while I use spacebar inside e.g. *ek wa*
, nothing is returned. Why and how to fix it ?
Btw: I'm using RavenDB - Build #960