1
我正在使用Nest 1.0和elasticsearch 1.0。我索引的一個POCO對象,我已經定義的映射:巢1.0 Elasticsearch,索引日期時間爲ISO 8601
_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)/
我該如何解決這個問題?我已檢查存儲的映射
謝謝,