Fix double counts when count is executed on two aliases pointing to the same index

This commit is contained in:
Igor Motov 2011-05-11 16:56:07 -04:00 committed by kimchy
parent aa9730834f
commit bc6d9c19e8
1 changed files with 2 additions and 1 deletions

View File

@ -177,13 +177,14 @@ public class MetaData implements Iterable<IndexMetaData> {
for (String index : indices) {
if (!this.indices.containsKey(index)) {
possiblyAliased = true;
break;
}
}
if (!possiblyAliased) {
return indices;
}
ArrayList<String> actualIndices = Lists.newArrayListWithCapacity(indices.length);
Set<String> actualIndices = Sets.newHashSetWithExpectedSize(indices.length);
for (String index : indices) {
String[] actualLst = aliasAndIndexToIndexMap.get(index);
if (actualLst == null) {