Skip to content

Commit c1be09f

Browse files
authored
Remove unused field from IndexModule (#137342)
1 parent b79ed62 commit c1be09f

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

server/src/main/java/org/elasticsearch/index/IndexModule.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
6363
import org.elasticsearch.indices.recovery.RecoveryState;
6464
import org.elasticsearch.plugins.IndexStorePlugin;
65-
import org.elasticsearch.plugins.internal.rewriter.QueryRewriteInterceptor;
6665
import org.elasticsearch.script.ScriptService;
6766
import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry;
6867
import org.elasticsearch.threadpool.ThreadPool;
@@ -495,8 +494,7 @@ public IndexService newIndexService(
495494
IdFieldMapper idFieldMapper,
496495
ValuesSourceRegistry valuesSourceRegistry,
497496
IndexStorePlugin.IndexFoldersDeletionListener indexFoldersDeletionListener,
498-
Map<String, IndexStorePlugin.SnapshotCommitSupplier> snapshotCommitSuppliers,
499-
QueryRewriteInterceptor queryRewriteInterceptor
497+
Map<String, IndexStorePlugin.SnapshotCommitSupplier> snapshotCommitSuppliers
500498
) throws IOException {
501499
final IndexEventListener eventListener = freeze();
502500
Function<IndexService, CheckedFunction<DirectoryReader, DirectoryReader, IOException>> readerWrapperFactory = indexReaderWrapper
@@ -560,7 +558,6 @@ public IndexService newIndexService(
560558
snapshotCommitSupplier,
561559
indexCommitListener.get(),
562560
mapperMetrics,
563-
queryRewriteInterceptor,
564561
indexingStatsSettings,
565562
searchStatsSettings,
566563
mergeMetrics

server/src/main/java/org/elasticsearch/index/IndexService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
9191
import org.elasticsearch.indices.recovery.RecoveryState;
9292
import org.elasticsearch.plugins.IndexStorePlugin;
93-
import org.elasticsearch.plugins.internal.rewriter.QueryRewriteInterceptor;
9493
import org.elasticsearch.script.ScriptService;
9594
import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry;
9695
import org.elasticsearch.threadpool.ThreadPool;
@@ -170,7 +169,6 @@ public class IndexService extends AbstractIndexComponent implements IndicesClust
170169
private final Supplier<Sort> indexSortSupplier;
171170
private final ValuesSourceRegistry valuesSourceRegistry;
172171
private final MapperMetrics mapperMetrics;
173-
private final QueryRewriteInterceptor queryRewriteInterceptor;
174172
private final IndexingStatsSettings indexingStatsSettings;
175173
private final SearchStatsSettings searchStatsSettings;
176174
private final MergeMetrics mergeMetrics;
@@ -210,7 +208,6 @@ public IndexService(
210208
IndexStorePlugin.SnapshotCommitSupplier snapshotCommitSupplier,
211209
Engine.IndexCommitListener indexCommitListener,
212210
MapperMetrics mapperMetrics,
213-
QueryRewriteInterceptor queryRewriteInterceptor,
214211
IndexingStatsSettings indexingStatsSettings,
215212
SearchStatsSettings searchStatsSettings,
216213
MergeMetrics mergeMetrics
@@ -290,7 +287,6 @@ public IndexService(
290287
this.indexingOperationListeners = Collections.unmodifiableList(indexingOperationListeners);
291288
this.indexCommitListener = indexCommitListener;
292289
this.mapperMetrics = mapperMetrics;
293-
this.queryRewriteInterceptor = queryRewriteInterceptor;
294290
try (var ignored = threadPool.getThreadContext().clearTraceContext()) {
295291
// kick off async ops for the first shard in this index
296292
this.refreshTask = new AsyncRefreshTask(this);

server/src/main/java/org/elasticsearch/indices/IndicesService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,7 @@ private synchronized IndexService createIndexService(
834834
idFieldMappers.apply(idxSettings.getMode()),
835835
valuesSourceRegistry,
836836
indexFoldersDeletionListeners,
837-
snapshotCommitSuppliers,
838-
queryRewriteInterceptor
837+
snapshotCommitSuppliers
839838
);
840839
}
841840

server/src/test/java/org/elasticsearch/index/IndexModuleTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
import org.elasticsearch.indices.fielddata.cache.IndicesFieldDataCache;
9494
import org.elasticsearch.indices.recovery.RecoveryState;
9595
import org.elasticsearch.plugins.IndexStorePlugin;
96-
import org.elasticsearch.plugins.internal.rewriter.MockQueryRewriteInterceptor;
9796
import org.elasticsearch.script.ScriptService;
9897
import org.elasticsearch.search.internal.ReaderContext;
9998
import org.elasticsearch.test.ClusterServiceUtils;
@@ -245,8 +244,7 @@ private IndexService newIndexService(IndexModule module) throws IOException {
245244
module.indexSettings().getMode().idFieldMapperWithoutFieldData(),
246245
null,
247246
indexDeletionListener,
248-
emptyMap(),
249-
new MockQueryRewriteInterceptor()
247+
emptyMap()
250248
);
251249
}
252250

0 commit comments

Comments
 (0)