Hi everyone,
I'm trying to override the french analyser in my index. What i want is that
this custom 'french' analyzer becomes the default analyzer for all searches
and indexing, if none is given explicitly.
The settings i give are like this :
{
"index":{
"cluster.name":"test-cluster",
"client.transport.sniff":true,
"analysis":{
"filter":{
"french_elision":{
"type":"elision",
"articles":[
"l",
"m",
"t",
"qu",
"n",
"s",
"j",
"d",
"c",
"jusqu",
"quoiqu",
"lorsqu",
"puisqu"
]
},
"french_stop":{
"type":"stop",
"stopwords":"french",
"ignore_case":true
},
"snowball":{
"type":"snowball",
"language":"french"
}
},
"analyzer":{
"french":{
"tokenizer":"standard",
"filter":[
"french_elision",
"lowercase",
"french_stop",
"snowball"
]
},
"lower_analyzer":{
"type":"custom",
"tokenizer":"keyword",
"filter":"lowercase"
},
"token_analyzer":{
"type":"custom",
"tokenizer":"whitespace"
},
"default":{
"type":"french"
}
}
}
}
}
The problem is that my analyzer seems to work correctly, but it is not used
as a default.
A test with inquisitor plugin gives me this :
Index: test-indexAnalyzed Textdefaultaime 1cheval 3frenchaim 1cheval 3
lower_analyzerj'aime les chevaux 1token_analyzerj'aime 1les 2chevaux 3
As you can see, the french override analyzer gives me a perfect result, but
the default one gives me wrong result. The verb is not stemmed to 'aim' and
stays 'time' (which is not correct). Only the 'chevaux' word is stemmed to
'cheval' (which is correct).
Do you know what i'm doing wrong ? Or how i could do to tell ElasticSearch
to choose my custom french analyzer as its default analyzer instead of
digging out the built-in french analyzer ?
Note : I tried giving it directly a name instead of a type, but with no
luck, like this : "default": "french"
Thanks for all your help in advance !
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/980c2240-15ec-4ba2-ad46-a57e17300070%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.