0
0
Fork 0

make DocCount() on IndexAlias consistent with partial results

it will now return the partial count of nodes that did
respond without error
This commit is contained in:
Marty Schoch 2016-02-23 12:54:55 -05:00
parent 5408083ab5
commit 55c43ae6c2
1 changed files with 3 additions and 3 deletions

View File

@ -122,10 +122,10 @@ func (i *indexAliasImpl) DocCount() (uint64, error) {
for _, index := range i.indexes {
otherCount, err := index.DocCount()
if err != nil {
return 0, err
if err == nil {
rv += otherCount
}
rv += otherCount
// tolerate errors to produce partial counts
}
return rv, nil