mlissner
mlissner

Reputation: 18206

How to optimize Solr index when not enough disk space?

I need to optimize a solr index that currently has about 1,000 files on disk that take up about 400GB. I have 200GB free on my disk, and I have another disk with about 1TB of free space.

Is there any way to either:

My impression is that Solr rebuilds the index from scratch and then swaps it in, so it seems like this ought to somehow be possible. I've got a terabyte sitting there. Can I use it?

Upvotes: 0

Views: 1484

Answers (1)

Anand
Anand

Reputation: 81

Copy the data to the 1TB drive and change solrconfig.xml to point to the new directory.

https://wiki.apache.org/solr/SolrConfigXml#dataDir_parameter

<dataDir>/var/data/solr</dataDir>

Make sure you stop your server before you copy the data. Optimize the index and expunge the deleted documents.

Upvotes: 1

Related Questions