as discussed, statistics as they are will work for calculating stats that are idempotent in nature, but will not work in general in the situation where data is duplicated multiple times - into multiple different indices.
Our discussion was that it makes sense to isolate stats per index id. This will provide an option to retrieve stats per index or aggregate stats across all indices. For idempotent statistics the normal merge operation should suffice, but to support non-idempotent stats we will need another method implemented by these stats that will merge across indices. Count is a good example, and it seems reasonable for count to take the max of any per-index count as its non-idempotent merge operation (normal merge sums 2 counts together, but if data is duplicated across indices you will end up double-counting the data).
as discussed, statistics as they are will work for calculating stats that are idempotent in nature, but will not work in general in the situation where data is duplicated multiple times - into multiple different indices.
Our discussion was that it makes sense to isolate stats per index id. This will provide an option to retrieve stats per index or aggregate stats across all indices. For idempotent statistics the normal merge operation should suffice, but to support non-idempotent stats we will need another method implemented by these stats that will merge across indices. Count is a good example, and it seems reasonable for count to take the max of any per-index count as its non-idempotent merge operation (normal merge sums 2 counts together, but if data is duplicated across indices you will end up double-counting the data).