Hi
I'm using nested types to manage multilingual : the root object contains
values for the default language, and I have several nested objects that
represents translation in other languages : fr, gr, ar ...
Is there any way to define a specific analyzer for each nested type.
Thanks 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/56aead44-f0d3-4525-8ca7-90bab8e06784%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Well, I found the answer : using dynamic template.
"person" : {
"dynamic_templates" : [
{
"nested_template": {
"match" : "fr|en",
"match_pattern" : "regex",
"mapping" : {
"type" : "nested"
}
}
},
{
"template_fr" : {
"path_match" : "fr.",
"match_mapping_type" : "string",
"mapping" : {
"type" : "multi_field",
"fields" : {
"{name}" : {"type": "string", "index" : "analyzed", "analyzer" :
"fr_analyzer"},
"raw" : {"type": "string", "index" : "not_analyzed"}
}
}
}
},
{
"template_fr" : {
"path_match" : "en.",
"match_mapping_type" : "string",
"mapping" : {
"type" : "multi_field",
"fields" : {
"{name}" : {"type": "string", "index" : "analyzed", "analyzer" :
"en_analyzer"},
"raw" : {"type": "string", "index" : "not_analyzed"}
}
}
}
}
]
}
Le mardi 4 mars 2014 10:19:09 UTC+1, Mohamed Hedi ABIDI a écrit :
Hi
I'm using nested types to manage multilingual : the root object contains
values for the default language, and I have several nested objects that
represents translation in other languages : fr, gr, ar ...
Is there any way to define a specific analyzer for each nested type.
Thanks 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/0b99e1d2-8f0b-466a-8c99-e610b7dbb47a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.