原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/analysis-apostrophe-tokenfilter.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/analysis-apostrophe-tokenfilter.html
本地英文版地址: ../en/analysis-apostrophe-tokenfilter.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Apostrophe token filteredit
Strips all characters after an apostrophe, including the apostrophe itself.
This filter is included in Elasticsearch’s built-in Turkish language analyzer. It uses Lucene’s ApostropheFilter, which was built for the Turkish language.
Exampleedit
The following analyze API request demonstrates how the apostrophe token filter works.
GET /_analyze { "tokenizer" : "standard", "filter" : ["apostrophe"], "text" : "Istanbul'a veya Istanbul'dan" }
The filter produces the following tokens:
[ Istanbul, veya, Istanbul ]
Add to an analyzeredit
The following create index API request uses the apostrophe token filter to configure a new custom analyzer.
PUT /apostrophe_example { "settings" : { "analysis" : { "analyzer" : { "standard_apostrophe" : { "tokenizer" : "standard", "filter" : ["apostrophe"] } } } } }