Hi all,
I'm using the latest NEST c# driver with the latest Elasticsearch (5.x), and I'm having the hardest time setting a text field of one of my documents to "not_analyzed" using fluent mapping.
Below is my latest attempt. I've tried dozens of variations of that. For simplicity's sake, let's assume that my object is of Type LoanDetail, and there is only one field on that object. It's a string, with the field name, "Purpose."
Any advice would be much appreciated. Here's my code:
var settings = new ConnectionSettings(node).DefaultIndex("loandetails");
var client = new ElasticClient(settings);
//create the index if it doesn't exist
if (!client.IndexExists("loandetails").Exists)
{
var response = client.CreateIndex("loandetails", l => l
.Mappings(ms => ms
.Map(m => m
.Properties(ps => ps
.Text(t => t
.Name(pn => pn.Purpose)
.Analyzer("not_analyzed")
) ) ) )
);
}