原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/analysis-classic-tokenfilter.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/analysis-classic-tokenfilter.html
本地英文版地址: ../en/analysis-classic-tokenfilter.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Classic token filteredit
Performs optional post-processing of terms generated by the
classic
tokenizer.
This filter removes the english possessive ('s
) from the end of words and
removes dots from acronyms. It uses Lucene’s
ClassicFilter.
Exampleedit
The following analyze API request demonstrates how the classic token filter works.
GET /_analyze { "tokenizer" : "classic", "filter" : ["classic"], "text" : "The 2 Q.U.I.C.K. Brown-Foxes jumped over the lazy dog's bone." }
The filter produces the following tokens:
[ The, 2, QUICK, Brown, Foxes, jumped, over, the, lazy, dog, bone ]
Add to an analyzeredit
The following create index API request uses the classic token filter to configure a new custom analyzer.
PUT /classic_example { "settings" : { "analysis" : { "analyzer" : { "classic_analyzer" : { "tokenizer" : "classic", "filter" : ["classic"] } } } } }