开发者

solr index subdirectory

开发者 https://www.devze.com 2022-12-19 03:04 出处:网络
I have just started using 开发者_StackOverflowSOLR. 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

I have just started using 开发者_StackOverflowSOLR. 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消