Reputation: 199
I'm attempting to use nest and elasticsearch to index records with a field that is not analyzed so regexp can be used against the field.
Using attributes:
[String(Index = FieldIndexOption.NotAnalyzed)]
public string Normalisedpath { get; set; }
Then calling automap:
client.Map<JobRequestView>(p => p.AutoMap());
Unfortunately this is not reflected in the mapping in elasticsearch.
"normalisedpath": {
"type": "string"
},
I've tried delete the index so ES recreates it, is there something I'm missing here?
Upvotes: 1
Views: 1130
Reputation: 199
Turns out you have to make sure the index exists before attempting to map to it. :)
Upvotes: 1