Sorry but i can't make it work.
I tried this :
{
"record":{
"_all":{
"enabled":false
},
"index_analyzer":"my_french",
"search_analyzer":"my_french",
"properties":{
"_uuid":{
"type":"string",
"store":"yes",
"index":"not_analyzed"
},
"a":{
"type":"multi_field",
"fields":{
"a":{
"type":"string",
"store":"yes",
"index":"analyzed"
},
"raw":{
"type":"string",
"store":"no",
"index":"not_analyzed"
},
"tokens":{
"type":"string",
"store":"no",
"index":"analyzed",
"analyzer":"token_analyzer"
},
"lower":{
"type":"string",
"store":"no",
"index":"analyzed",
"analyzer":"lower_analyzer"
}
}
},
...
But my analyzer is not taken into consideration while searching (but it is
while indexing).
The mapping i get from the created index just states : "analyzer":
"my_french" (it must have concatenated the search_ and index_ analyzers),
but still not working for search.
I have to specify the analyzer in my query. :
{
"query": {
"match": {
"a": {
"query": "aimera"
"analyzer": "my_french"
}
}
}
}
Like this it works, but it's not the behaviour i want.
Le mercredi 20 août 2014 04:24:40 UTC+2, vineeth mohan a écrit :
>
> Hello Frederic ,
>
> This was what i had in mind -
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html
>
> Place the default mapping under config and index creation will take
> default values from there.
>
> Thanks
> Vineeth
>
>
> On Tue, Aug 19, 2014 at 7:58 PM, Frederic Esnault <[email protected]
> <javascript:>> wrote:
>
> Hi Vineeth and thanks for your answer.
>
> If i understood correctly, what you suggest is to add a _default_ section
> in all mappings, right ?
> First, I would prefer to set it once and for all in the global settings.
> I'd be surprised there is no way to reference a custom analyzer in the
> global default analyzer definition, but maybe...
> Second, your link relates to default mapping, not settings.
> Finally, could you give me an example of default analyzer using your
> solution, just to test ? Documentation is too thin.
>
>
> Le mardi 19 août 2014 14:56:10 UTC+2, vineeth mohan a écrit :
>
> Hello Frederic ,
>
> I believe you can use the default configuration settings for this -
> http://www.elasticsearch.org/guide/en/elasticsearch/
> reference/current/index-modules-mapper.html#_default_mapping
>
> Thanks
> Vineeth
>
>
>
> On Tue, Aug 19, 2014 at 5:51 PM, Frederic Esnault <[email protected]>
> wrote:
>
> 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_"<span
> style="color:rgb(102,102,102);font-family:'Ubu
>
> ...
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/ce7fa514-1265-470c-8f91-64db35351433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.