From 1fd006cc5622cc1fd5939c2205adf34d61d1337b Mon Sep 17 00:00:00 2001
From: Michael Peter Christen <mc@yacy.net>
Date: Wed, 17 Jul 2013 12:41:54 +0200
Subject: [PATCH] fixes using the embedded connector

---
 htroot/IndexReIndexMonitor_p.java                       | 2 +-
 source/net/yacy/search/index/ReindexSolrBusyThread.java | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/htroot/IndexReIndexMonitor_p.java b/htroot/IndexReIndexMonitor_p.java
index d77525cb3..2eb5660f6 100644
--- a/htroot/IndexReIndexMonitor_p.java
+++ b/htroot/IndexReIndexMonitor_p.java
@@ -53,7 +53,7 @@ public class IndexReIndexMonitor_p {
                 prop.put("showstartbutton", 0);
             }            
         } else {
-            if (post != null && post.containsKey("reindexnow")) {
+            if (post != null && post.containsKey("reindexnow") && sb.index.fulltext().connectedLocalSolr()) {
                 migration.reindexToschema(sb);
                 prop.put("showstartbutton", 0);
                 prop.put("querysize", "0");
diff --git a/source/net/yacy/search/index/ReindexSolrBusyThread.java b/source/net/yacy/search/index/ReindexSolrBusyThread.java
index 0f846421d..0b45ec370 100644
--- a/source/net/yacy/search/index/ReindexSolrBusyThread.java
+++ b/source/net/yacy/search/index/ReindexSolrBusyThread.java
@@ -60,8 +60,7 @@ import org.apache.solr.common.SolrInputDocument;
          */
         public ReindexSolrBusyThread(String query) {
             super(100,1000,0,500);
-            this.esc = Switchboard.getSwitchboard().index.fulltext().getDefaultEmbeddedConnector();
-            if  (this.esc == null) this.esc = Switchboard.getSwitchboard().index.fulltext().getDefaultRemoteSolrConnector();
+            this.esc = Switchboard.getSwitchboard().index.fulltext().getDefaultConnector();
             this.colcfg = Switchboard.getSwitchboard().index.fulltext().getDefaultConfiguration();
 
             if (Switchboard.getSwitchboard().getThread("reindexSolr") != null) {