0

In my previous code I was using a DynamicDictionary as a base class for my DataRecordDictionary document

[ElasticsearchType(Name = "DataRecordDictionary")]
public class DataRecordDictionary : DynamicDictionary
{
    [String(Store = false, Index = FieldIndexOption.NotAnalyzed)]
    public string FileId { get; set; }

    [Date(Store = false)]
    public DateTime Timestamp { get; set; }
}

So I was able to store the FileId, the Timestamp and a custom set of key-value pairs (note the base class)

Now, having updated to NEST2 and ElasticSearch2 the DynamicDictionary is gone but I still need to persist key-value pairs on the database.

Is there any new dictionary data structure I could use which is recognized by Elasticsearch and that can be stored in it?

4

1 回答 1

2

动态字典重命名为DynamicResponse. 有关 v2.0 版本中的重大更改,请参阅 ES 的发行说明

于 2016-02-25T20:12:00.530 回答