其他分享
首页 > 其他分享> > 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" }

标签:15.1,自定义,type,analyzer,filter,分词器,test,my
来源: https://www.cnblogs.com/cc299/p/11032848.html