原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/analysis-decimal-digit-tokenfilter.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/analysis-decimal-digit-tokenfilter.html
本地英文版地址: ../en/analysis-decimal-digit-tokenfilter.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Decimal digit token filteredit
Converts all digits in the Unicode Decimal_Number General Category to 0-9.
For example, the filter changes the Bengali numeral ৩ to 3.
This filter uses Lucene’s DecimalDigitFilter.
Exampleedit
The following analyze API request uses the decimal_digit
filter to convert Devanagari numerals to 0-9:
GET /_analyze
{
"tokenizer" : "whitespace",
"filter" : ["decimal_digit"],
"text" : "१-one two-२ ३"
}
The filter produces the following tokens:
[ 1-one, two-2, 3]
Add to an analyzeredit
The following create index API request uses the
decimal_digit filter to configure a new
custom analyzer.
PUT /decimal_digit_example
{
"settings" : {
"analysis" : {
"analyzer" : {
"whitespace_decimal_digit" : {
"tokenizer" : "whitespace",
"filter" : ["decimal_digit"]
}
}
}
}
}