【发布时间】:2014-07-24 05:05:18
【问题描述】:
我正在使用 Nest 1.0 和 elasticsearch 1.0。我正在索引一个 POCO 对象,并且我已经定义了一个映射:
_elasticsearchClient.Map<Customer>(c => c
.Index("customers")
.DynamicDateFormats(new[] { "dateOptionalTime", "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z" })
.DateDetection(true)
.NumericDetection(true)
.AllField(a => a
.Enabled()
.IndexAnalyzer("nGram_analyzer")
.SearchAnalyzer("whitespace_analyzer")
.TermVector(TermVectorOption.with_positions_offsets))
.Properties(props => props
.Date(s => s
.Name(p => p.Created).Format("dateOptionalTime").Store())));
但是当我检查该日期是如何保存在我的索引中时,我得到: 创建:/日期(1399890590)/
我该如何解决这个问题?我已经检查了正在存储的映射
谢谢,
【问题讨论】:
标签: c# elasticsearch nest