Index definition(also has the fields included above):
AccountsSearch
docs.Accounts
.Select(account => new () { BrokerId = account.BrokerId,
Content = new System.Object []{account.Name, account.Phone, account.Fax},
ObjectType = "Accounts" })
server build 960, client build 960
query:
session.Query<RavenResult>(searchCategory + "Search").Statistics(out stats)
.Where(x => x.BrokerId == brokerId
.Search(x => x.Content, query + "*",
options: Raven.Client.Linq.SearchOptions.And,
escapeQueryOptions: EscapeQueryOptions.AllowPostfixWildcard)
.As<Object>()
.Skip(searchOptions.PageIndex * searchOptions.PageSize)
.Take(searchOptions.PageSize + 1)
.Lazily();
var results = query.LazyQuery.Value.ToList();