How to specify language Analyzer on CreateIndex using C#


(Gabriele) #1

Using the C# Nest client (6.2.0) i need to set the Analyzer property to use one of the native Analyzers (italian, english, french ....).

This is my code for CreateIndex

var response = this.mysource.ElasticClient.CreateIndex(IndexName, index => index
.Settings(s => s
.Analysis(a => a
.Analyzers( ???????????????????????? ))
.NumberOfShards (1)
.NumberOfReplicas (0)
)
.Mappings(ms => ms.Map<poco_map_entity>(m => m .AutoMap())
)
);

I can't find any source of information on what i have to write in for the Analyzers object.

Using attributes on poco_mapentity allow me to specify the language Analyzer but i want to set up into the index creation task.

Please HELP me...

Thank you in advance...


(Russ Cam) #2

Take a look at the .NET client documentation on writing analyzers


(Gabriele) #3

Thank you. I turned around for a whole day without find the correct page.....


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.