@@ -334,8 +334,6 @@ public class SearchService extends AbstractLifecycleComponent implements IndexEv
334
334
335
335
private volatile int maxOpenPitContext ;
336
336
337
- private volatile int maxClauseCount ;
338
-
339
337
private volatile boolean allowDerivedField ;
340
338
341
339
private final Cancellable keepAliveReaper ;
@@ -410,8 +408,8 @@ public SearchService(
410
408
lowLevelCancellation = LOW_LEVEL_CANCELLATION_SETTING .get (settings );
411
409
clusterService .getClusterSettings ().addSettingsUpdateConsumer (LOW_LEVEL_CANCELLATION_SETTING , this ::setLowLevelCancellation );
412
410
413
- setMaxClauseCount (INDICES_MAX_CLAUSE_COUNT_SETTING .get (settings ));
414
- clusterService .getClusterSettings ().addSettingsUpdateConsumer (INDICES_MAX_CLAUSE_COUNT_SETTING , this ::setMaxClauseCount );
411
+ IndexSearcher . setMaxClauseCount (INDICES_MAX_CLAUSE_COUNT_SETTING .get (settings ));
412
+ clusterService .getClusterSettings ().addSettingsUpdateConsumer (INDICES_MAX_CLAUSE_COUNT_SETTING , IndexSearcher ::setMaxClauseCount );
415
413
416
414
allowDerivedField = CLUSTER_ALLOW_DERIVED_FIELD_SETTING .get (settings );
417
415
clusterService .getClusterSettings ().addSettingsUpdateConsumer (CLUSTER_ALLOW_DERIVED_FIELD_SETTING , this ::setAllowDerivedField );
@@ -495,11 +493,6 @@ private void setLowLevelCancellation(Boolean lowLevelCancellation) {
495
493
this .lowLevelCancellation = lowLevelCancellation ;
496
494
}
497
495
498
- private void setMaxClauseCount (int maxClauseCount ) {
499
- this .maxClauseCount = maxClauseCount ;
500
- IndexSearcher .setMaxClauseCount (maxClauseCount );
501
- }
502
-
503
496
@ Override
504
497
public void afterIndexRemoved (Index index , IndexSettings indexSettings , IndexRemovalReason reason ) {
505
498
// once an index is removed due to deletion or closing, we can just clean up all the pending search context information
0 commit comments