最近在看ES 的官网guide,在pattern-tokenizer 小节有如下的例子:
我然后把分隔符换成@, #,$ 问题来了
前两个都可以正常的分词,但是唯独 $不能正常的分词,这个是怎么回事呢~~~
https://www.elastic.co/guide/e ... lcurl -XPUT 'localhost:9200/my_index?pretty' -H 'Content-Type: application/json' -d'
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "my_tokenizer"
}
},
"tokenizer": {
"my_tokenizer": {
"type": "pattern",
"pattern": ","
}
}
}
}
}
'
curl -XPOST 'localhost:9200/my_index/_analyze?pretty' -H 'Content-Type: application/json' -d'
{
"analyzer": "my_analyzer",
"text": "comma,separated,values"
}
'
0 个回复