On 11/13/2018 8:05 AM, John Milton wrote:
All the created collections are available under the Solr installed
directory only.

I want to change the data directory into other drives,  for example if my
Solr instance is installed on C drive means,  I want to store all the
collection index on D drive.

Absolutely the easiest way is to move the entire Solr installation to the other drive.  The Solr program bits take very little space compared to most indexes, so there should be little downside to that notion.

Next easiest is to change the solr home.  This is done with the -s option on the commandline.  You can also do this with solr.in.cmd as Erick mentioned.  This separates Solr's cores (and their index data) from the program, which I think is a great option.

Setting the solr data directory, also mentioned by Erick, keeps the core definitions in the solr home and moves the data directories (which includes things like the index) so they are relative to another location.  When this feature was first introduced, I thought it was pretty nice, but I have reached a point where I don't really like it, preferring to relocate the whole solr home.

If it's important for you to have the data separated from the program, setting the solr home is in my opinion the right way to go.  This separation is achieved by the service installer script that Solr includes, which runs on most operating systems other than Windows.  A service installer for Windows is something that's been on my mind to try and pursue, but there's never enough time.

Thanks,
Shawn

Reply via email to