Disappearing cores in Solr

2019-08-30 10:07发布

问题:

I am new to Solr.

I have created two cores from the admin page, let's call them "books" and "libraries", and imported some data there. Everything works without a hitch until I restart the server. When I do so, one of these cores disappears, and the logging screen in the admin page contains:

SEVERE  CoreContainer  null:java.lang.NoClassDefFoundError: net/arnx/jsonic/JSONException
SEVERE  SolrCore       REFCOUNT ERROR: unreferenced org.apache.solr.core.SolrCore@454055ac (papers) has a reference count of 1

I was testing my query in the admin interface; when I refreshed it, the "libraries" core was gone, even though I could normally query it just a minute earlier. The contents of solr.xml are intact. Even if I restart Tomcat, it remains gone.

Additionally, I was trying to build a query similar to this: "Find books matching 'war peace' in libraries in Atlanta or New York". So given cores "books" and "libraries", I would issue "books" the following query (which might be wrong, if it is please correct me):

(title:(war peace) blurb:(war peace))
AND _query_:"{!join
fromIndex=libraries from=libraryid to=libraryid
v='city:(new york) city:(atlanta)'}"

When I do so, the query fails with "libraries" core disappears, with the above symptoms. If I re-add it, I can continue working (as long as I don't restart the server or issue another join query).

I am using Solr 4.0; if anyone has a clue what is happening, I would be very grateful. I could not find out anything about the meaning of the error message, so if anyone could suggest where to look for that, or how go about debugging this, it would be really great. I can't even find where the log file itself is located...

回答1:

I would avoid the Debian package which may be misconfigured and quirky. And it contains (a very early build of?) solr 4.0, which itself may have lingering issues; being the first release in a new major version. The package maintainer may not have incorporated the latest and safest Solr release into his package.

A better way is to download Solr 4.1 yourself and set it up yourself with Tomcat or another servlet container.



回答2:

In case you are looking to install SOLR 4.0 and configure, you can following the installation procedure from here



回答3:

Update the solr config for the cores to be persistent.

In your solr.xml, update <solr> or <solr persistent="false"> to <solr persistent="true">



标签: solr