ElasticProperty in elastic search 2.0

45 Views Asked by At

I use following Elastic properties in elastic search 1.0

[ElasticProperty(Name = "description", Index = FieldIndexOption.Analyzed, Type = FieldType.String, Analyzer = "custom_lowercase_analyzer", SearchAnalyzer = "search_analyser")]
    public string description { get; set; }

How can we use these properties in elasticsearch 2.0

1

There are 1 best solutions below

0
jaspreet chahal On

You can refer here for more details,

[Text(Name = "first_name", Analyzer = "custom_lowercase_analyzer", SearchAnalyzer = "search_analyser")]
public string description { get; set; }

Index = FieldIndexOption.Analyzed is removed instead we have Index=true or false Index is true by default so you don't need to provide it.