Deprecate the "index.max_adjacency_matrix_filters" index setting (#46394)
Following performance optimisations to the adjacency_matrix aggregation we no longer require this setting. Marked as deprecated and due for removal in 8.0 Related #46324
This commit is contained in:
parent
a6834068e3
commit
323ec022be
|
@ -109,4 +109,5 @@ where examining interactions _over time_ becomes important.
|
|||
|
||||
==== Limitations
|
||||
For N filters the matrix of buckets produced can be N²/2 and so there is a default maximum
|
||||
imposed of 100 filters . This setting can be changed using the `index.max_adjacency_matrix_filters` index-level setting.
|
||||
imposed of 100 filters . This setting can be changed using the `index.max_adjacency_matrix_filters` index-level setting
|
||||
(note this setting is deprecated and will be removed in 8.0+).
|
|
@ -179,7 +179,7 @@ public final class IndexSettings {
|
|||
* N filters is (N*N)/2 so a limit of 100 filters is imposed by default.
|
||||
*/
|
||||
public static final Setting<Integer> MAX_ADJACENCY_MATRIX_FILTERS_SETTING =
|
||||
Setting.intSetting("index.max_adjacency_matrix_filters", 100, 2, Property.Dynamic, Property.IndexScope);
|
||||
Setting.intSetting("index.max_adjacency_matrix_filters", 100, 2, Property.Dynamic, Property.IndexScope, Property.Deprecated);
|
||||
public static final TimeValue DEFAULT_REFRESH_INTERVAL = new TimeValue(1, TimeUnit.SECONDS);
|
||||
public static final Setting<TimeValue> INDEX_REFRESH_INTERVAL_SETTING =
|
||||
Setting.timeSetting("index.refresh_interval", DEFAULT_REFRESH_INTERVAL, new TimeValue(-1, TimeUnit.MILLISECONDS),
|
||||
|
@ -823,11 +823,18 @@ public final class IndexSettings {
|
|||
|
||||
/**
|
||||
* Returns the max number of filters in adjacency_matrix aggregation search requests
|
||||
* @deprecated This setting will be removed in 8.0
|
||||
*/
|
||||
@Deprecated
|
||||
public int getMaxAdjacencyMatrixFilters() {
|
||||
return this.maxAdjacencyMatrixFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param maxAdjacencyFilters the max number of filters in adjacency_matrix aggregation search requests
|
||||
* @deprecated This setting will be removed in 8.0
|
||||
*/
|
||||
@Deprecated
|
||||
private void setMaxAdjacencyMatrixFilters(int maxAdjacencyFilters) {
|
||||
this.maxAdjacencyMatrixFilters = maxAdjacencyFilters;
|
||||
}
|
||||
|
|
|
@ -364,7 +364,9 @@ public class IndexSettingsTests extends ESTestCase {
|
|||
.build());
|
||||
settings = new IndexSettings(metaData, Settings.EMPTY);
|
||||
assertEquals(IndexSettings.MAX_ADJACENCY_MATRIX_FILTERS_SETTING.get(Settings.EMPTY).intValue(),
|
||||
settings.getMaxAdjacencyMatrixFilters());
|
||||
settings.getMaxAdjacencyMatrixFilters());
|
||||
assertWarnings("[index.max_adjacency_matrix_filters] setting was deprecated in Elasticsearch and will be removed in a "
|
||||
+ "future release! See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
|
||||
public void testMaxRegexLengthSetting() {
|
||||
|
|
|
@ -79,5 +79,7 @@ public class AdjacencyMatrixAggregationBuilderTests extends ESTestCase {
|
|||
AggregatorFactory factory = aggregationBuilder.doBuild(context, null, new AggregatorFactories.Builder());
|
||||
assertThat(factory instanceof AdjacencyMatrixAggregatorFactory, is(true));
|
||||
assertThat(factory.name(), equalTo("dummy"));
|
||||
assertWarnings("[index.max_adjacency_matrix_filters] setting was deprecated in Elasticsearch and will be "
|
||||
+ "removed in a future release! See the breaking changes documentation for the next major version.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue