【发布时间】:2019-09-07 10:08:02
【问题描述】:
我正在使用 NEST 客户端在具有 .net 核心应用程序的弹性数据库中进行搜索。
除了_id 和_score 字段都未绑定之外,一切正常。
所有其他字段,例如时间戳已填满。
我也尝试使用 [Number (Name="_score")] 和 [Text(Name="_id")] 属性,但字段始终为空/默认值
我错过了什么?
public sealed class ElasticMapping
{
[Date(Name = "@timestamp")]
public DateTime Timestamp { get; set; }
[PropertyName("_id")]
public string ElasticId { get; set; }
[PropertyName("_score")]
public Nullable<double> Score { get; set; }
}
【问题讨论】:
标签: .net elasticsearch .net-core nest