We update our customers' Solr version periodically. We created a shared core called remote_shared_instance
in Solr. Some customers use this and others don't. The customers who don't use the core are seeing error message about the remote_shared_instance
org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher
The error message is displayed because these customers often didn't rebuild the index, which was created with an old Solr version (3 or less). The current Solr (5.5.5) can't handle this index.
I am using Perl, and I want to create a program which will check whether the remote_shared_instance
index is empty. If so, it will drop the core and restart Solr, which will automatically create a new index and the error message will disappear.
How can I make sure remote_shared_instance
index is empty?
I printed the files in the 'index' folder from one customer who gets the error message:
-rw-rw---- 1 sfxglb41 sfx 32 Sep 10 2014 segments_1
-rw-rw---- 1 sfxglb41 sfx 20 Sep 10 2014 segments.gen
-rw-r----- 1 sfxglb41 sfx 0 Jun 13 04:42 write.lock