Hello everyone,

we are using multiple indices query (to simulate join over aliased indices) and aggregation and we ran into an issue with same field names. Let me describe on example:

`PUT /A/data/1 { "key": "KEY_A", "count" : 1 } PUT /A/data/2 { "key": "KEY_A", "count" : 1 } PUT /B/data/1 { "key": "KEY_A", "count" : 4, "text" : "HELLO" }`

`GET A,B/_search { "size": 0, "aggs": { "KEY_AGG" : { "terms": { "field": "key" }, "aggs": { "SUM_COUNT": { "sum": { "field": "count" } }, "FIRST_B_TEXT" : { "terms": { "field": "text", "size": 1 } } } } } }`

Unfortunately I need to sum only from index A (therefore get SUM: 2 instead of 6), but it takes field `count`

from both indices. Is there any way to specify only index A? Something like: `"field": "A.count"`

? Please note that A and B are actually aliases, however I hope that it's not that important..

Thanks in advance

Jan