1

I have maven project and i have recently introduced Solr to act as a search indexer for my data. Solr contains configuration files such as schema.xml or solr.xml etc, but these files sit within solr package. I would like to add these files to version control (SVN) of my project. but i dont want the entire solr in my SVN just the configuration files.

What would be the correct way of managing this? I don't want to just simply add these files, and each time when i check out the code paste those files in solr, too many release steps...

Ideally i would want solr configuration to link to my files automatically so i can change them at any time, and each time i update the changes to SVN, solr would pull the new configs without me having to interfere.

Any suggestions appreciated.

zalis
  • 1,191
  • 1
  • 11
  • 20

1 Answers1

0

The best way I've found is to create a solr-conf directory at the top-level of your project structure, containing all of your Solr config:

- project - solr-conf solr.xml - collection1 - conf

You then run Solr using your solr-conf directory as SOLR_HOME. You will need to either set your Solr dataDir property to something outside your directory tree, or add collection1/data to the svn:ignore list.

To change the data directory, you should be able to add -Dsolr.data.dir=/data/path to your Solr command line (the actual property used is specified in the dataDir element in solrconfig.xml). Alternatively, svn:ignore specifies a set of paths that should not be added to version control.

Matt Pearce
  • 484
  • 3
  • 7
  • Thanks for your response! would you be able to elaborate on your last sentence regarding dataDir and svn:ignore, not sure how this would work – zalis Oct 30 '15 at 10:40