The problem it comes when I try to do it on the NEST client:
client.Indices.Create("testindex", e => e
.Settings(s => s
.Analysis(a => a
.Normalizers(n => n.Custom("case_insensitive",c => c.Filters("lowercase")))))
.Map(m => m
.Properties(p => p
.Text(st => st.Name("Name")
**.NORMALIZER**)))
);
There is no way to add the normalizer the Name property field.
This property is part of keyword type properties as docs say.
The normalizer property of keyword fields is similar to analyzer except that it guarantees that the analysis chain produces a single token.
Simply changing your prop. to keyword field will allow you to place normalizer
await client.Indices.CreateAsync("testindex", e => e
.Settings(s => s
.Analysis(a => a
.Normalizers(n => n.Custom("case_insensitive", c => c.Filters("lowercase")))))
.Map(m => m
.Properties(p => p
.Keyword(st => st.Normalizer("case_insensitive").Name("Name"))))
);
Normalizer is only available on keyword fields, you were nearly there with mapping the provided example to csharp. You still need to introduce the Fields for Name
var response2 = Client.Indices.Create("testindex", e => e
.Settings(s => s
.Analysis(a => a
.Normalizers(n => n.Custom("case_insensitive", c => c.Filters("lowercase")))))
.Map(m => m
.Properties(p => p
.Text(st => st
.Name("Name")
.Fields(f => f
.Keyword(kw => kw.Name("Keyword").Normalizer("case_insensitive"))
)
)
)
)
);
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.