lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shashank Pedamallu <>
Subject Re: Reload an unloaded core
Date Tue, 02 May 2017 22:04:30 GMT
Thank you Simon, Erick and Shawn for your replies. Unfortunately, restarting Solr is not a
option for me. So, I’ll try to follow the steps given by Shawn to see where I’m standing.
Btw, I’m using Solr 6.4.2.

Shawn, once again thank you very much for the detailed reply.

Shashank Pedamallu

On 5/2/17, 2:51 PM, "Shawn Heisey" <> wrote:

>On 5/2/2017 10:53 AM, Shashank Pedamallu wrote:
>> I want to unload a core from Solr without deleting data-dir or instance-dir. I’m
performing some operations on the data-dir after this and then I would like to reload the
core from the same data-dir. These are the things I tried:
>>   1.  Reload api – throws an exception saying no such core exists.
>>   2.  Create api – throws an exception saying a core with given name already exists.
>> Can someone point me what api I could use to achieve this. Please note that, I’m
working with Solr in Non-Cloud mode without Zookeeper, Collections, etc.
>The RELOAD command isn't going to work at all because the core has been
>unloaded -- Solr doesn't know about the core, so it can't reload it. 
>This is a case where the language used is somewhat confusing, even
>though it's completely correct.
>I am about 90 percent certain that the reason the CREATE command gave
>you an error message is because you tried to make a new
>file before you did the CREATE.  When things are working correctly, the
>CREATE command itself is what will create  If it
>already exists, CoreAdmin will give you an error.  This is the exact
>text of the error I encountered when trying to use CREATE after building
>a file manually:
>Error CREATEing SolrCore 'foo': Could not create a new core in
>C:\Users\sheisey\Downloads\solr-6.5.1\server\solr\fooas another core is
>already defined there
>That error message is confusing, so I will be fixing it:

>To verify what you need to do, I fired up Solr 6.5.1 from an extracted
>download directory.  I created two cores, "foo" and "bar", using the
>commandline "bin\solr create" command.  Then I went to the admin UI and
>unloaded foo.  The foo directory was still there, but the core was gone
>from Solr's list.
>By clicking on the "Add Core" button in the Core Admin tab, typing "foo"
>into name and instanceDir, and clearing the other text boxes, the core
>was recreated exactly as it was before it was unloaded.
>This is the log from the CREATE command that the admin UI sent:
>2017-05-02 18:02:49.232 INFO  (qtp1543727556-18) [   x:foo]
>o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores
>status=0 QTime=396
>To double-check this and show how it can be done without the admin UI, I
>accessed these two URLs (in a browser), and accomplished the exact same
>thing again.  The first URL unloads the core, the second asks Solr to
>find the core and re-add it with default settings.


>If you are using additional options with your cores, such as the
>configset parameter, you would need to include those options on your
>CREATE call, similar to what you might have done when you initially
>created the core.  With some of the options you can use, re-adding a
>core might be better done by re-creating the correct
>file and restarting Solr so it discovers the core.
>Erick, I seem to remember the "" rename
>happening in the past as well, but when I unloaded on 6.5.1, the
> file was simply deleted.  I don't think that's a good
>idea because it may contain information that's not available anywhere else.
View raw message