lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Van Besien <>
Subject dynamically adding core with auto-discovery in Solr 4.5
Date Tue, 08 Oct 2013 20:38:05 GMT

We are using auto discovery and have a use case where we want to be
able to add cores dynamically, without restarting solr.

In 4.4 we were able to
- add a directory (e.g. "core1") with an empty
- call http://localhost:8983/solr/admin/cores?action=CREATE&core=core1&name=core1&instanceDir=%2Fsomewhere%2Fcore1

In 4.5 however this (the second step) fails, saying it cannot create a
new core in that directory because another core is already defined

>From the documentation (, I
understand that since 4.3 we should actually do "RELOAD". However,
RELOAD results in this stacktrace:

org.apache.solr.common.SolrException: Error handling 'reload' action
at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(
at org.apache.solr.handler.RequestHandlerBase.handleRequest(
at org.apache.solr.servlet.SolrDispatchFilter.handleAdminRequest(
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
at org.mortbay.jetty.servlet.ServletHandler.handle(
at org.mortbay.jetty.servlet.SessionHandler.handle(
at org.mortbay.jetty.handler.ContextHandler.handle(
at org.mortbay.jetty.webapp.WebAppContext.handle(
at org.mortbay.jetty.handler.HandlerWrapper.handle(
at org.mortbay.jetty.Server.handle( at
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
at org.mortbay.jetty.HttpParser.parseNext( at
org.mortbay.jetty.HttpParser.parseAvailable( at
org.mortbay.jetty.HttpConnection.handle( at$
at org.mortbay.thread.QueuedThreadPool$
Caused by: org.apache.solr.common.SolrException: Unable to reload
core: core1 at org.apache.solr.core.CoreContainer.recordAndThrow(
at org.apache.solr.core.CoreContainer.reload(
at org.apache.solr.handler.admin.CoreAdminHandler.handleReloadAction(
... 20 more Caused by: org.apache.solr.common.SolrException: No such
core: core1 at org.apache.solr.core.CoreContainer.reload(
... 21 more

Note that before I RELOAD, the core1 directory was created.

Also note that next to the core1 directory, there is a core0 directory
which has exactly the same content and is auto-discovered perfectly
fine at startup.

So... what should it be? Or am I missing something here?

thanks in advance,

View raw message