diff --git a/core/src/main/java/org/elasticsearch/index/IndexSettings.java b/core/src/main/java/org/elasticsearch/index/IndexSettings.java index 20c23e3becd..29395088b3c 100644 --- a/core/src/main/java/org/elasticsearch/index/IndexSettings.java +++ b/core/src/main/java/org/elasticsearch/index/IndexSettings.java @@ -101,7 +101,7 @@ public final class IndexSettings { /** * Index setting describing the maximum value of allowed `script_fields`that can be retrieved - * per search request. The default maximum of 50 is defensive for the reason that retrieving + * per search request. The default maximum of 32 is defensive for the reason that retrieving * script fields is a costly operation. */ public static final Setting MAX_SCRIPT_FIELDS_SETTING = diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/30_limits.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/30_limits.yml index b0b5e5ffede..3ee99822452 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/30_limits.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/30_limits.yml @@ -5,6 +5,7 @@ setup: body: settings: index.max_docvalue_fields_search: 2 + index.max_script_fields: 2 - do: index: @@ -72,21 +73,11 @@ setup: --- "Script_fields size limit": - - skip: - version: " - 6.99.99" - reason: soft limit for script_fields only available as of 7.0.0 - - - do: - indices.create: - index: test_2 - body: - settings: - index.max_script_fields: 2 - do: catch: /Trying to retrieve too many script_fields\. Must be less than or equal to[:] \[2\] but was \[3\]\. This limit can be set by changing the \[index.max_script_fields\] index level setting\./ search: - index: test_2 + index: test_1 body: query: match_all: {}