Apostrophe token filter
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.
Example
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 analyzer
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" ]
}
}
}
}
}
© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/7.17/analysis-apostrophe-tokenfilter.html