DynamicDictionary is gone on ElasticSearch 2.0 (Elasticsearch.Net)

211 Views Asked by At

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?

1

There are 1 best solutions below

0
vendettamit On BEST ANSWER

DynamicDictionary is renamed to DynamicResponse. See the release notes of ES for breaking changes in v2.0 release.