I'm learning elasticsearch+nest, i want to map a type into a net class:
[ElasticType(Name="car")]
public class Car {}
{
[ElasticProperty(Name = "color", Index = FieldIndexOption.NotAnalyzed, Type = FieldType.String)]
public string Color { get; set; }
}
but the code does not compile neither ElasticType and ElasticProperty is available.
I referenced nest.dll 2.1.1 and Elasticsearch.Net.dll 2.1.1 from nuget.
1) For 6.6 you should use ElasticsearchType instead of ElasticType.
https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/attribute-mapping.html
2) Add "using Nest;" to file where Car class resides (NEST Nuget package must be added to same project).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With