Language analyzer en français


#1

bonjour,
je suis la documentation Language Analyzers avec cette URL https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-lang-analyzer.html. Je prends l'exemple pour le français mais j'obtiens le message d'erreur suivant:
{"error":{"root_cause":[{"type":"index_creation_exception","reason":"failed to create index"}],"type":"illegal_argument_exception","reason":"keyword filter requires either keywords or keywords_path to be configured"},"status":400}
Cela doit sûrement être gros comme une maison mais là, je sèche.
une idée ?
merci


(David Pilato) #2

Tu peux poster ce que tu fais ?


#3
curl -X POST http://localhost:9200/french -d '
{
  "settings": {
    "analysis": {
      "filter": {
        "french_elision": {
          "type":         "elision",
          "articles_case": true,
            "articles": [
              "l", "m", "t", "qu", "n", "s",
              "j", "d", "c", "jusqu", "quoiqu",
              "lorsqu", "puisqu"
            ]
        },
        "french_stop": {
          "type":       "stop",
          "stopwords":  "_french_" 
        },
        "french_keywords": {
          "type":       "keyword_marker",
          "keywords":   [] 
        },
        "french_stemmer": {
          "type":       "stemmer",
          "language":   "light_french"
        }
      },
      "analyzer": {
        "french": {
          "tokenizer":  "standard",
          "filter": [
            "french_elision",
            "lowercase",
            "french_stop",
            "french_keywords",
            "french_stemmer"
          ]
        }
      }
    }
  }
}
'

(David Pilato) #4

A quoi te sert:

"french_keywords": {
          "type":       "keyword_marker",
          "keywords":   [] 
        },

Si tu ne mets pas de keywords?


#5

je ne fait que prendre l'exemple donné dans la documentation...
j'ai viré le french_keywords et tout est OK
merci


(David Pilato) #6

Tu n'as pas remarqué le 2 à côté du filtre qui dit:

This filter should be removed unless there are words which should be excluded from stemming.

?


Update analyzer (stopwords)
(Maikel Janssen) #7

Hey, this seems a little like the problem i am having. But i tried the solution mentioned above, but did not get it to work. Listed the issue here Update analyzer (stopwords) maybe you can help me with it.
Cheers


(system) #8