Snowball token filter
Snowball token filter
A filter that stems words using a Snowball-generated stemmer. The language
parameter controls the stemmer with the following available values: 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] Deprecated in 8.16.0. Kp
and Lovins
support will be removed in a future version
For example:
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"
}
}
}
}
}
当前内容版权归 elasticsearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 elasticsearch .