user752590
user752590

Reputation: 101

Solr-8.9.0 index directory size reduced

Enviornment - solr-8.9.0,jdk-11.0.12

i have used following command to calculate index in solr.

du -sh solr-8.9.0/server/solr/core_name/data/index

But when i executed above command again after some time(5 Hrs) than index size was reduced to 64% of previous calculated index size. what can be possible reason for this? Is it right way to calculate the index or there are any other method?

Upvotes: 0

Views: 189

Answers (1)

Gaël J
Gaël J

Reputation: 15070

It depends on what you mean by "index size". What you use gives you the size on disk of the index, not the number of documents it contains.

The size on disk can reduce thanks to the "segments merging" done by Solr: basically your index is a bunch of files/segments that keep deleted documents in addition to current documents until a merge occurs, when the merge occurs the deleted documents are actually really deleted from disk, thus freeing some space.

This is quite a simplification of what's really happening, you can read more about it in Solr documentation.

Upvotes: 1

Related Questions