1
votes

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?

1

1 Answers

1
votes

Turns out you have to make sure the index exists before attempting to map to it. :)