[Data - Elasticsearch] Appliquer analyzer sur champ Objet
Bonjour!
J'utilise cet analyzer:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| {
"index": {
"number_of_shards": 1,
"analysis": {
"filter": {
"word_joiner": {
"type": "word_delimiter",
"catenate_all": true,
"preserve_original": true
}
},
"analyzer": {
"word_join_analyzer": {
"type": "custom",
"filter": [
"word_joiner"
],
"tokenizer": "keyword"
}
}
}
}
} |
Le champ concerné est celui-ci:
Code:
1 2
| @Field(type = FieldType.Object, analyzer = "word_join_analyzer")
private Description description; |
Et ça c'est ma sclasse Description:
Code:
1 2 3 4 5
| public class Description {
@JsonProperty("localizedDescriptions")
private Map<String, String> descriptions = new HashMap<>();
} |
Voilà ce qu edonne le mapping Elasticsearch:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| {
"description":{
"properties":{
"localizedDescriptions":{
"properties":{
"en":{
"type":"string"
},
"fr":{
"type":"string"
},
"it":{
"type":"string"
}
}
}
}
}
} |
L'analyzer n'est donc pas appliqué. Comment je peux faire dans ce cas? surtout que mon objet contient une map?
Merci!