Classic token filter
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.
Example
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 analyzer
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" ]
}
}
}
}
}
© 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-classic-tokenfilter.html