标签:hue toe res rip bbs hspa tdm apn sehll
创建自定义分词器
测试分词器
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 自定义分词器
标签:hue toe res rip bbs hspa tdm apn sehll
原文地址:https://www.cnblogs.com/cc299/p/11032848.html