I m 刚刚从Raven开始,指数I ve制造的指数始终没有指数。 我发现拉文服务器上有许多错误,如:
{
Index: "HomeBlurb/IncludeTotalCosts",
Error: "Cannot implicitly convert type double to int . An explicit conversion exists (are you missing a cast?)",
Timestamp: "2012-01-14T15:40:40.8943226Z",
Document: null
}
指数一的制定就是:
public class HomeBlurb_IncludeTotalCosts : AbstractIndexCreationTask<MPDocument, HomeBlurb_IncludeTotalCosts.ReduceResult>
{
public class ReduceResult
{
public string Name { get; set; }
public string Constituency { get; set; }
public decimal AmountPaid { get; set; }
}
public HomeBlurb_IncludeTotalCosts()
{
Map = mps => from mp in mps
from expense in mp.Expenses
select new
{
mp.Name,
mp.Constituency,
AmountPaid = expense.AmountPaid ?? 0M
};
Reduce = results => from result in results
group result by new { result.Name, result.Constituency }
into g
select new
{
g.Key.Name,
g.Key.Constituency,
AmountPaid = g.Sum(x => x.AmountPaid)
};
}
}
该指数由Raven(通过Ravenudio)创建,看来是罚款。
我真心要说的是,Im使用的文件并不包含任何双重或ts,而我所储存的唯一数字是小错。
这个问题可能是什么?