标签:ken set oid top sharp ast cas app ext
public void SetAnalysis() { if (!client.IndexExists("employee").Exists) { client.CreateIndex("employee", i => i.Settings( s => s.Analysis(a => a.CharFilters(c=>c.Mapping("&_to_and",m=>m.Mappings("&=> and "))) .TokenFilters(t=>t.Stop("my_stopwords",ss=>ss.StopWords("the","a"))) .Analyzers(aa=>aa.Custom("es_std", cu=>cu.CharFilters("html_strip","&_to_and").Tokenizer("standard").Filters("lowercase","my_stopwords")))) )); } client.Map<employee>(m => m.Properties(p => p.Text(t => t.Name("last_name").Analyzer("es_std"))).AutoMap()); }
标签:ken set oid top sharp ast cas app ext
原文地址:https://www.cnblogs.com/chenyishi/p/11577228.html