nest2

Bulk write on ElasticSearch 2.0 NEST 2.0 throws a stackoverflow exception

痴心易碎 提交于 2019-12-13 19:04:59
问题 I was using bulk insertion on my ElasticSearch 1.0 and NEST 1.0. Now I moved to ElasticSearch 2.0 and NEST 2.0 and the bulk insertion throws a stackoverflow (!) exception. My gut feeling is that an infinite recursion is taking place and it consumes the entire stack. this is my POCO [ElasticsearchType(Name = "MyDoc")] public class MyDoc: DynamicResponse { [String(Store = false, Index = FieldIndexOption.NotAnalyzed)] public string HistoryId { get; set; } [String(Store = false, Index =

NEST 2.0 doesn't persist some fields into ElasticSearch 2.0

落花浮王杯 提交于 2019-12-12 03:36:44
问题 This is my document: [ElasticsearchType(Name = "MyDoc")] public class MyDoc: Dictionary<string, object> { [String(Store = false, Index = FieldIndexOption.NotAnalyzed)] public string text { get; set; } } As you can see, it inherits from Dictionary<string, object> so I can dinamically add fields to it (this is a requirement to make aggregation work) Here I store the mapping: client.Map<MyDoc>(m => m.Index("myindexname").AutoMap()); Now I create a new record and store it: var rec= new MyDoc();