我最近开始在我的项目中使用分片文档存储。回到一些旧的功能,我现在得到一个错误。想知道是否还不支持跨分片数据存储获取建议?当调用"建议"时,得到错误"您无法获得此查询的数据库命令"。不知道现在还能做什么
using (var session = Store.OpenSession())
{
var query = session.Query<Item>("ItemIndex").Statistics(out stats)
.Search(x => x.Title, searchCriteria.Title)
.Where(x => x.ItemZip.In(zipcodes))
.Skip(pageNumber * 40)
.Take(40); // Take posts in the page size
toReturn = query.ToList();
if (toReturn.Count() == 0)
{
var results = query.Suggest(new SuggestionQuery()//<---- error here
{
Field = "Title",
Term = searchCriteria.Title,
MaxSuggestions = 1,
Accuracy = 0.4f,
Popularity = true,
}).Suggestions;
if (results.Count() > 0)
{
searchCriteria.AlternateSearch = results[0];
}
}
Google groups from Oren的回应。"…目前不支持"
https://groups.google.com/forum/!主题/ravendb ksJcQD1OJqE