mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Use 'script.context.field.max_compilations_rate' instead of deprecated setting
This commit is contained in:
parent
6c2f9a2ed2
commit
6e6ad04c5c
@ -35,6 +35,7 @@ from eland.tests import (
|
|||||||
ES_TEST_CLIENT,
|
ES_TEST_CLIENT,
|
||||||
ELASTICSEARCH_HOST,
|
ELASTICSEARCH_HOST,
|
||||||
)
|
)
|
||||||
|
from eland.common import es_version
|
||||||
|
|
||||||
|
|
||||||
DATA_LIST = [
|
DATA_LIST = [
|
||||||
@ -87,7 +88,10 @@ def _setup_data(es):
|
|||||||
|
|
||||||
def _update_max_compilations_limit(es, limit="10000/1m"):
|
def _update_max_compilations_limit(es, limit="10000/1m"):
|
||||||
print("Updating script.max_compilations_rate to ", limit)
|
print("Updating script.max_compilations_rate to ", limit)
|
||||||
|
if es_version(es) < (7, 8):
|
||||||
body = {"transient": {"script.max_compilations_rate": limit}}
|
body = {"transient": {"script.max_compilations_rate": limit}}
|
||||||
|
else:
|
||||||
|
body = {"transient": {"script.context.field.max_compilations_rate": limit}}
|
||||||
es.cluster.put_settings(body=body)
|
es.cluster.put_settings(body=body)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user