原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/analysis-uaxurlemail-tokenizer.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/analysis-uaxurlemail-tokenizer.html
本地英文版地址: ../en/analysis-uaxurlemail-tokenizer.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
UAX URL Email Tokenizeredit
The uax_url_email tokenizer is like the standard tokenizer except that it
recognises URLs and email addresses as single tokens.
Example outputedit
POST _analyze
{
"tokenizer": "uax_url_email",
"text": "Email me at john.smith@global-international.com"
}
The above sentence would produce the following terms:
[ Email, me, at, john.smith@global-international.com ]
while the standard tokenizer would produce:
[ Email, me, at, john.smith, global, international.com ]
Configurationedit
The uax_url_email tokenizer accepts the following parameters:
|
|
The maximum token length. If a token is seen that exceeds this length then
it is split at |
Example configurationedit
In this example, we configure the uax_url_email tokenizer to have a
max_token_length of 5 (for demonstration purposes):
PUT my_index
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "my_tokenizer"
}
},
"tokenizer": {
"my_tokenizer": {
"type": "uax_url_email",
"max_token_length": 5
}
}
}
}
}
POST my_index/_analyze
{
"analyzer": "my_analyzer",
"text": "john.smith@global-international.com"
}
The above example produces the following terms:
[ john, smith, globa, l, inter, natio, nal.c, om ]