15.1 自定义分词器
生活随笔
收集整理的這篇文章主要介紹了
15.1 自定义分词器
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
創建自定義分詞器 測試分詞器 DELETE /test_analyzer PUT /test_analyzer { "settings": { "analysis": { "char_filter": { "sign_to_word": { "type": "mapping", "mappings": ["&=> and","+=>add"] } }, "filter": { "my_stopwords": { "type": "stop", "stopwords": ["the", "a", "her", "his"] } }, "analyzer": { "my_analyzer": { "type": "custom", "char_filter": ["html_strip", "sign_to_word"], "tokenizer": "standard", "filter": ["lowercase", "my_stopwords"] } } } } } GET /test_analyzer/_analyze { "text": "ruru is a her <a href/> HAHA!!!", "analyzer": "my_analyzer" }
轉載于:https://www.cnblogs.com/cc299/p/11032848.html
總結
以上是生活随笔為你收集整理的15.1 自定义分词器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件需求工程与UML建模14组14周工作
- 下一篇: Struts2---入门