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:

  1. resp = client.indices.create(
  2. index="my-index-000001",
  3. settings={
  4. "analysis": {
  5. "analyzer": {
  6. "my_analyzer": {
  7. "tokenizer": "standard",
  8. "filter": [
  9. "lowercase",
  10. "my_snow"
  11. ]
  12. }
  13. },
  14. "filter": {
  15. "my_snow": {
  16. "type": "snowball",
  17. "language": "English"
  18. }
  19. }
  20. }
  21. },
  22. )
  23. print(resp)
  1. const response = await client.indices.create({
  2. index: "my-index-000001",
  3. settings: {
  4. analysis: {
  5. analyzer: {
  6. my_analyzer: {
  7. tokenizer: "standard",
  8. filter: ["lowercase", "my_snow"],
  9. },
  10. },
  11. filter: {
  12. my_snow: {
  13. type: "snowball",
  14. language: "English",
  15. },
  16. },
  17. },
  18. },
  19. });
  20. console.log(response);
  1. PUT /my-index-000001
  2. {
  3. "settings": {
  4. "analysis": {
  5. "analyzer": {
  6. "my_analyzer": {
  7. "tokenizer": "standard",
  8. "filter": [ "lowercase", "my_snow" ]
  9. }
  10. },
  11. "filter": {
  12. "my_snow": {
  13. "type": "snowball",
  14. "language": "English"
  15. }
  16. }
  17. }
  18. }
  19. }