From c3c3f29a7dc52bc77f82aed89a014e63b29f35ae Mon Sep 17 00:00:00 2001 From: Anshum Gupta Date: Mon, 6 Oct 2014 21:54:58 +0000 Subject: [PATCH] SOLR-6597: Removed SolrIndexConfig parameter from one of the SolrIndexSearcher constructor, where it was never really used git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1629772 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ solr/core/src/java/org/apache/solr/core/SolrCore.java | 7 +++---- .../java/org/apache/solr/search/SolrIndexSearcher.java | 9 ++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 73ad4d78a23..3d1cf1140b0 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -275,6 +275,9 @@ Other Changes * SOLR-6550: Provide simple mechanism for passing additional metadata / context about a server-side SolrException back to the client-side (Timothy Potter) +* SOLR-6597: SolrIndexConfig parameter in one of the SolrIndexSearcher constructor has been removed. + It was just passed and never used via that constructor. (Anshum Gupta) + ================== 4.10.1 ================== Bug Fixes diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index 395741bd6b9..97925e0cb2d 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -1527,8 +1527,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable { // (caches take a little while to instantiate) final boolean useCaches = !realtime; final String newName = realtime ? "realtime" : "main"; - tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), - getSolrConfig().indexConfig, newName, + tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), newName, newReader, true, useCaches, true, directoryFactory); } else { @@ -1539,7 +1538,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable { // so that we pick up any uncommitted changes and so we don't go backwards // in time on a core reload DirectoryReader newReader = newReaderCreator.call(); - tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), getSolrConfig().indexConfig, + tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), (realtime ? "realtime":"main"), newReader, true, !realtime, true, directoryFactory); } else if (solrConfig.nrtMode) { RefCounted writer = getUpdateHandler().getSolrCoreState().getIndexWriter(this); @@ -1549,7 +1548,7 @@ public final class SolrCore implements SolrInfoMBean, Closeable { } finally { writer.decref(); } - tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), getSolrConfig().indexConfig, + tmp = new SolrIndexSearcher(this, newIndexDir, getLatestSchema(), (realtime ? "realtime":"main"), newReader, true, !realtime, true, directoryFactory); } else { // normal open that happens at startup diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java index 282795d53eb..546cf257149 100644 --- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java +++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java @@ -235,13 +235,16 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn } } - public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, boolean enableCache, DirectoryFactory directoryFactory) throws IOException { + public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, + boolean enableCache, DirectoryFactory directoryFactory) throws IOException { // we don't need to reserve the directory because we get it from the factory - this(core, path, schema, config, name, getReader(core, config, directoryFactory, path), true, enableCache, false, directoryFactory); + this(core, path, schema, name, getReader(core, config, directoryFactory, path), true, enableCache, false, directoryFactory); this.createdDirectory = true; } - public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, SolrIndexConfig config, String name, DirectoryReader r, boolean closeReader, boolean enableCache, boolean reserveDirectory, DirectoryFactory directoryFactory) throws IOException { + public SolrIndexSearcher(SolrCore core, String path, IndexSchema schema, String name, DirectoryReader r, + boolean closeReader, boolean enableCache, boolean reserveDirectory, + DirectoryFactory directoryFactory) throws IOException { super(wrapReader(core, r)); this.path = path;