Buildout to Setup Solr Instance
There are different kinds of solr instances:
standalone
multi core
Solr Instance
Here is the buildout structure:
- BUILDOUT/etc/solr
This will be the solr/home in the context.xml file.- context.xml
The context.xml will be the symlink target on CATALINA_BASE/Catalina/localhost. - solr-app-version.war
- solr.xml
- mw - for MediaWiki core
- conf
- solrconfig.xml
- schema.xml
- db-data-config.xml
- xslt
- rss.xsl
- google.xsl
- data
- lib
- conf
- context.xml
The data directory for indexing data will be set in file solrconfig.xml. We will set the datadir to something like BUILDOUT/var/solr. Here is a sample:
<config> ... <dataDir>/home/sean/buildout/var/solr</dataDir> ... </config>
The lib could be included in war file. OR, use the lib in solrconfig.xml to set a specific lib.
perform the following actions:
A typical Solr application
A tpical solr application will have the following parts:
- context.xml on CATALINA_BASE/conf/Catalina/localhost
- codebase to the solr.war
- solr/home folder path as the Environment in context.xml. It could be the absolute path.
- solr/home folder has the following structure
- solr.xml: defines the cores by give a name and the instance path.
The instance directory could be absolute path. Each core has the following folder structure. - solr-core-name
- conf: the solr configuration folder.
- solrconfig.xml
- schema.xml
- db-data-config.xml
- xslt transform templages
- data: the index storage space.
- lib: extra library files, such as JDBC driver for data importer.
- conf: the solr configuration folder.
- solr.xml: defines the cores by give a name and the instance path.
Solr Multiple Cores and Multiple Indexes
Solr Multiple cores -> multiple indexes -> merge indexes.