标签: c# .net elasticsearch nest
我有一个使用NEST 1.0和ElasticSearch 1.0的WebAPI C#项目
现在我转移到NEST 2.0和ElasticSearch 2.0,它不再编译
ElasticType已被弃用ElasticsearchType,这很好
ElasticType
ElasticsearchType
但是,我的POCO有很多属性:
[ElasticProperty(Store = false, Index = FieldIndexOption.NotAnalyzed)]
我应该使用新的NEST 2.0约定重写
我该怎么做?
答案 0 :(得分:2)
ElasticPropertyAttribute has been replaced with more specific attributes in NEST 2.x such as StringAttribute, DateAttribute, etc.反映每种不同字段类型映射的可用属性。
ElasticPropertyAttribute
StringAttribute
DateAttribute
Documentation is available for NEST 2.x on the Elastic clients documentation site