Carlos
Carlos

Reputation: 99

solr index subdirectory

I have just started using SOLR. I have configured the data directory in the solrconfig.xml. However, I've noticed that a subdirectory called index is always created in the end. Is there any way to avoid it?

Upvotes: 0

Views: 5930

Answers (2)

Frank Farmer
Frank Farmer

Reputation: 39356

Seems like there's a simple solution here.

Say your lucene directory is /path/to/lucene/lucene_index and solr's data dir is /path/to/solr/data, inside of which, it expects to find a /index subdirectory.

Why not symlink /path/to/solr/data/index to /path/to/lucene/lucene_index like so?

ln -s /path/to/lucene/lucene_index /path/to/solr/data/index

Of course, this assumes that solr will just work, when given a raw lucene index.

Upvotes: 2

harschware
harschware

Reputation: 13404

From my solrconfig.xml:

<!-- Used to specify an alternate directory to hold all index data
   other than the default ./data under the Solr home.
   If replication is in use, this should match the replication configuration. -->     
<!--  <dataDir>${solr.solr.home}data</dataDir>  -->

The SOLR index will be built in this directory when you start the SOLR server. The 'index' directory within it is where the SOLR server will place all your index data, without it you would not have a valid SOLR installation.

Upvotes: 2

Related Questions