|
|
@ -494,10 +494,11 @@ public final class Switchboard extends serverSwitch {
|
|
|
|
// set up the solr interface
|
|
|
|
// set up the solr interface
|
|
|
|
final String solrurls = getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, "http://127.0.0.1:8983/solr");
|
|
|
|
final String solrurls = getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, "http://127.0.0.1:8983/solr");
|
|
|
|
final boolean usesolr = getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) & solrurls.length() > 0;
|
|
|
|
final boolean usesolr = getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) & solrurls.length() > 0;
|
|
|
|
|
|
|
|
final int solrtimeout = getConfigInt(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_TIMEOUT, 10000);
|
|
|
|
|
|
|
|
|
|
|
|
if (usesolr && solrurls != null && solrurls.length() > 0) {
|
|
|
|
if (usesolr && solrurls != null && solrurls.length() > 0) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, 10000);
|
|
|
|
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, solrtimeout);
|
|
|
|
this.index.fulltext().connectRemoteSolr(instances);
|
|
|
|
this.index.fulltext().connectRemoteSolr(instances);
|
|
|
|
} catch (final IOException e ) {
|
|
|
|
} catch (final IOException e ) {
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
@ -1326,10 +1327,11 @@ public final class Switchboard extends serverSwitch {
|
|
|
|
// set up the solr interface
|
|
|
|
// set up the solr interface
|
|
|
|
final String solrurls = getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, "http://127.0.0.1:8983/solr");
|
|
|
|
final String solrurls = getConfig(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_URL, "http://127.0.0.1:8983/solr");
|
|
|
|
final boolean usesolr = getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) & solrurls.length() > 0;
|
|
|
|
final boolean usesolr = getConfigBool(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_ENABLED, false) & solrurls.length() > 0;
|
|
|
|
|
|
|
|
final int solrtimeout = getConfigInt(SwitchboardConstants.FEDERATED_SERVICE_SOLR_INDEXING_TIMEOUT, 10000);
|
|
|
|
|
|
|
|
|
|
|
|
if (usesolr && solrurls != null && solrurls.length() > 0) {
|
|
|
|
if (usesolr && solrurls != null && solrurls.length() > 0) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, 10000);
|
|
|
|
ArrayList<RemoteInstance> instances = RemoteInstance.getShardInstances(solrurls, null, null, solrtimeout);
|
|
|
|
this.index.fulltext().connectRemoteSolr(instances);
|
|
|
|
this.index.fulltext().connectRemoteSolr(instances);
|
|
|
|
} catch (final IOException e ) {
|
|
|
|
} catch (final IOException e ) {
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|
ConcurrentLog.logException(e);
|
|
|
|