Compare commits

...

1 Commits
v1.0.4 ... main

Author SHA1 Message Date
1d08518847
Indexes being written to are sorted to the top now 2024-12-02 22:36:12 -05:00
2 changed files with 6 additions and 1 deletions

BIN
elastop

Binary file not shown.

View File

@ -932,8 +932,13 @@ func main() {
totalSize += node.FS.Total.TotalInBytes - node.FS.Total.AvailableInBytes
}
// Sort indices by document count (descending)
// Sort indices - active ones first, then alphabetically within each group
sort.Slice(indices, func(i, j int) bool {
// If one is active and the other isn't, active goes first
if (indices[i].indexingRate > 0) != (indices[j].indexingRate > 0) {
return indices[i].indexingRate > 0
}
// Within the same group (both active or both inactive), sort alphabetically
return indices[i].index < indices[j].index
})