Фильтр токенов Snowball
Фильтр, который склоняет слова, используя стеммер, сгенерированный Snowball. Параметр language управляет стеммером, доступные значения: Arabic, Armenian, Basque, Catalan, Danish, Dutch, English, Estonian, Finnish, French, German, German2, Hungarian, Italian, Irish, Kp, Lithuanian, Lovins, Norwegian, Porter, Portuguese, Romanian, Russian, Serbian, Spanish, Swedish, Turkish.
[8.16.0] Устарел в 8.16.0. Kp и Lovins будут удалены в будущей версии
Например:
resp = client.indices.create(
index="my-index-000001",
settings={
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"my_snow"
]
}
},
"filter": {
"my_snow": {
"type": "snowball",
"language": "English"
}
}
}
},
)
print(resp) const response = await client.indices.create({
index: "my-index-000001",
settings: {
analysis: {
analyzer: {
my_analyzer: {
tokenizer: "standard",
filter: ["lowercase", "my_snow"],
},
},
filter: {
my_snow: {
type: "snowball",
language: "English",
},
},
},
},
});
console.log(response); PUT /my-index-000001
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [ "lowercase", "my_snow" ]
}
},
"filter": {
"my_snow": {
"type": "snowball",
"language": "English"
}
}
}
}
}
© 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/8.17/analysis-snowball-tokenfilter.html