Manually Compact Indexes

Using Enterprise 6.0

The compaction api https://docs.couchbase.com/server/6.0/rest-api/rest-compact-post.html document a post request.

We’ve done that as described on the bucket, and the compaction process logs as complete, but the the fragmentation on the index nodes still remain high. For some indexes is 50+ % and for some 40 … and for a few 99%. There is plenty of disk space and ram.

I’ve read that compaction for the indexes is a separate issue, which begs the quesiton: How can I compact the indexes.

Please help

@naftali, index compaction is managed by the indexer process without the need for external intervention for Standard GSI in EE version. The storage engine aims to keep the fragmentation at 30%. If, however, the index disk files are very small in size, then compaction doesn’t run. Could you check what is the disk file size for the indexes which have 99% fragmentation?