https://issues.apache.org/jira/browse/SOLR-6718 looks like I am not alone with my "weird" questions/ideas ;) And I should really switch over to 5 ;)
-----Ursprüngliche Nachricht----- Von: Clemens Wyss DEV [mailto:clemens...@mysign.ch] Gesendet: Donnerstag, 29. Januar 2015 08:08 An: solr-user@lucene.apache.org Betreff: AW: CoreContainer#createAndLoad, existing cores not loaded Thx Shawn. I am running latest-greatest Solr (4.10.3) Solr home is e.g. /opt/webs/<siteX>/WebContent/WEB-INF/solr the core(s) reside in /opt/webs/<siteX>/WebContent/WEB-INF/solr/cores Should these be found by core discovery? If not, how can I configure coreRootDirectory in sorl.xml to be "cores folder below <slorHome>" <str name="coreRootDirectory">${coreRootDirectory:<solrHome>/cores}</str> Note: the solr.xml is to be used for any of our 150sites we host. Therefore like it to be "generic" -> <solrHome>/cores -----Ursprüngliche Nachricht----- Von: Shawn Heisey [mailto:apa...@elyograg.org] Gesendet: Mittwoch, 28. Januar 2015 17:08 An: solr-user@lucene.apache.org Betreff: Re: CoreContainer#createAndLoad, existing cores not loaded On 1/28/2015 8:52 AM, Clemens Wyss DEV wrote: > My problem: > I create cores dynamically using container#create( CoreDescriptor ) and then > add documents to the very core(s). So far so good. > When I restart my app I do > container = CoreContainer#createAndLoad(...) but when I then call > container.getAllCoreNames() an empty list is returned. > > What cores should be loaded by the container if I call > CoreContainer#createAndLoad(...) > ? Where does the container lookup the "existing cores"? If the solr.xml is the old format, then cores are defined in solr.xml, in the <cores> section of that config file. There is a new format for solr.xml that is supported in version 4.4 and later and will be mandatory in 5.0. If that format is present, then Solr will use core discovery -- starting from either the solr home or a defined coreRootDirectory, solr will search for core.properties files and treat each directory where one is found as a core's instanceDir. http://wiki.apache.org/solr/Solr.xml%204.4%20and%20beyond Thanks, Shawn