comment faire pour configurer le synonyms_path dans elasticsearch

je suis assez nouveau à elasticsearch et je veux utiliser des synonymes, j'ai ajouté ces lignes dans le fichier de configuration:

index :
    analysis :
        analyzer : 
            synonym :
                type : custom
                tokenizer : whitespace
                filter : [synonym]
        filter :
            synonym :
                type : synonym
                synonyms_path: synonyms.txt

puis j'ai créé un indice de test:

"mappings" : {
  "test" : {
     "properties" : {
        "text_1" : {
           "type" : "string",
           "analyzer" : "synonym"
        },
        "text_2" : {
           "search_analyzer" : "standard",
           "index_analyzer" : "synonym",
           "type" : "string"
        },
        "text_3" : {
           "type" : "string",
           "analyzer" : "synonym"
        }
     }
  }

}

et insrted un essai de type avec ces données:

{
"text_3" : "foo dog cat",
"text_2" : "foo dog cat",
"text_1" : "foo dog cat"
}

synonyms.txt contient "foo,bar,baz", et quand je fais une recherche pour les foo elle renvoie à ce que j'attendais, mais quand je fais une recherche pour baz ou la barre de retour à zéro des résultats:

{
"query":{
"query_string":{
    "query" : "bar",
    "fields" : [ "text_1"],
    "use_dis_max" : true,
    "boost" : 1.0
}}} 

résultat:

{
"took":1,
"timed_out":false,
"_shards":{
"total":5,
"successful":5,
"failed":0
},
"hits":{
"total":0,
"max_score":null,
"hits":[
]
}
}