I am not able to find a way to use of decorators ElasticProperty and ElasticType mentioned in the documentation . They are nowhere to be found in the Library and it crash at compile time.
Demo code:
[ElasticType(
Name = "elasticsearchprojects2",
DateDetection = true,
NumericDetection = true,
SearchAnalyzer = "standard",
IndexAnalyzer = "standard",
DynamicDateFormats = new[] { "dateOptionalTime", "yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z" }
)]
public class ElasticSearchProject
{
public int Id { get; set; }
public string Name { get; set; }
[ElasticProperty(OmitNorms = true, Index = FieldIndexOption.not_analyzed)]
public string Country { get; set; }
Based on what I have just reviewed, it seems that NEST API has changed these attributes/decorators by ElasticSearchType and ElasticsearchPropertyAttributeBase respectively. Please verify it
The current documentation of Nest is out of date but the team is currently working hard to update it. For now we have this article about Nest 2.0 breaking changes that explains the changes in the API:
Renamed Types
- class AggregationDescriptor`1
class AggregationContainerDescriptor`1
class AliasRequest
class BulkAliasRequest
class AllFieldMapping
class AllField
class AllocateClusteRerouteCommand
class AllocateClusterRerouteCommand
class AnalysisSettings
class Analysis
class AndFilter
class AndQuery
class AverageAggregator
- class AverageAggregation
... Body limit reached when pasting all the changes
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.