Hello,
I have the following mapping:
{
"settings": {
"analysis": {
"analyzer": {
"en_stopwords": {
"type": "standard",
"stopwords": "_english_"
},
"de_stopwords": {
"type": "standard",
"stopwords": "_german_"
},
"fr_stopwords": {
"type": "standard",
"stopwords": "_french_"
}
}
}
},
"mappings": {
"properties": {
"title": {
"type": "text"
},
"_translations": {
"properties": {
"de": {
"properties": {
"locale": {
"type": "text",
"index": false
},
"title": {
"type": "text"
}
}
},
"fr": {
"properties": {
"locale": {
"type": "text",
"index": false
},
"title": {
"type": "text"
}
}
}
}
}
}
}
}
I can't do a global search for titles in the _translations property like:
GET _search
{
"query": {
"multi_match": {
"query": "My Search",
"fields": ["title", "_translations.*.title"]
}
}
}
We have a dozen translations, do we have to list each field one by one like this:
GET _search
{
"query": {
"multi_match": {
"query": "My Search",
"fields": [
"title",
"_translations.fr.title",
"_translations.de.title"
]
}
}
}
We also have another problem, when the language is English, we display the title directly but when it is for example French, is it possible to replace the value of the title field by that of _translations.fr.title at the time of data retrieval.
Thanks for your help.