Creating collections in SOLR
java, solr, solrj
Solution
For more information on setting up cores and how they work, please see the Solr Wiki - CoreAdmin for more details and some examples.
Your example for adding the second core-entry is sufficient.
The instance directory is the index-directory relative to your SOLR home value.
Problem
On the web searching for collections in SOLR i found only information about distributed search and so on but when I understand the concept of correclty collections are running on the same server instance using the same schema but are logically completely separated. Is this correct? So I can have 3 collections and searching on one collection won´t output results of another right? Would it be possible to search on more than one collection at once? But my main priority: How do I create a second collection? Even a link to a good doc would be appreciated. In my solr.xml i have ``` <cores adminPath="/admin/cores" defaultCoreName="web-collection" host="${host:}" hostPort="${jetty.port:}"> <core name="web-collection" instanceDir="." /> </cores> ``` Would it be sufficient to create a second core-entry and set different paths? like... ``` <cores adminPath="/admin/cores" defaultCoreName="web-collection" host="${host:}" hostPort="${jetty.port:}"> <core name="web-collection" instanceDir="web" /> <core name="test-collection" instanceDir="test" /> </cores> ``` What is the instanceDir about? Is it the index-directory relative to SOLR-Home?