@senmansei ;D
Do you merge indices? In this metric "indices.index1.primaries.merges.total_size_in_bytes" we will have the total bytes that were "mergeados". If you want to find the same value that is obtained in the GET _cat / index / my_index call you should parse the flag "indeices.index1.store.size_in_bytes". Data merge is performed to save disk space, ie if you have multiple small segments of a Lucene index, the merge will join together all those segments of a larger segment, which helps us a lot in search performance .