lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: How Solr knows the Cores it has on startup?
Date Wed, 13 Sep 2017 15:03:34 GMT
Easiest way is just to copy the entire directory that contains to the second Solr's SOLR_HOME directory (I'd have the
Solr instanced down). The core discovery Shawn mentioned just
recursively descends from SOLR_HOME and whenever it encounters a figures out that this is a core and loads it. So you
have some directory like
that has in it. Just move core1 to SOLR_HOME for solr2.

But this really seems like an XY problem. What do you hope to gain by
this? Why not just create a new core on Solr2 and start using that? Or
do you have a lot of cores on this machine and are just balancing the
number of them? In the latter case, why not just use SolrCloud and
ADDREPLICA/DELETEREPLICA to move cores around?


On Wed, Sep 13, 2017 at 6:09 AM, Shawn Heisey <> wrote:
> On 9/12/2017 11:27 AM, Shashank Pedamallu wrote:
>> I wanted to know how does Solr pick up cores on startup. Basically, what I would
like to try is Read cores created from one Solr instance from another Solr instance. i.e.,
>>   *   I will have 2 Solr Instances SOLR1, SOLR2. Only SOLR1 is started.
>>   *   I’m creating a core (Core1) using SOLR1.
>>   *   After filling it to some capacity, I unload this core without deleting the
>>   *   I would now start SOLR2 and would like to point SOLR2 to Core1.
>> Can someone please share me the details on how I can achieve this?
> In Solr 4.4, the core discovery process became usable.  In 4.x versions
> starting with 4.4, core discovery was optional, but recommended.
> In Solr 5.0, the old solr.xml way of specifying cores was removed, and
> now Solr only supports core discovery.
> Through the CoreAdmin API, you can add Solr cores that are positioned
> anywhere on the filesystem, but if you want them to be found on startup,
> they must all be located in one place, typically underneath the solr
> home directory.  You can use filesystem tricks like symlinks to have the
> true locations be variable.
> It would be a very bad idea to try and have two Solr instances pointing
> at the same solr home, unless you could be absolutely certain that they
> would never run at the same time.  Instead, you should move or copy a
> core from one instance's solr home to that of another instance to
> transfer it.
> Thanks,
> Shawn

View raw message