I'm a bit confused how to best handle the following scenario with Elasticsearch. I've different types of documents, which have fields with semantically the same content but different field names (see examples). Field type-a.a should be handled like type-b.b or type-c.c.
As far as I know an alias for multiple fields is not supported (enter link description here).
Document 1:
{
"id": 1,
"type-a": {
"a": 300
}
}
Document 2:
{
"id": 2,
"type-b": {
"b": 200
}
}
Document 3:
{
"id": 3,
"type-c": {
"c": 200
}
}
Is there a way to map this fields to common field? What would be best practice? Denormalize the fields before ingesting it to the index?
Thanks for any ideas!