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());
        }

  

相关文章:

  • 2021-09-26
猜你喜欢
  • 2021-07-27
  • 2022-12-23
  • 2021-06-04
  • 2021-05-24
  • 2022-12-23
  • 2022-01-29
  • 2021-09-22
相关资源
相似解决方案