mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Merge pull request #77 from Winterflower/max-compilations-limit
Increase script.max_compilations_rate
This commit is contained in:
commit
d3caf663c5
@ -1,5 +1,6 @@
|
||||
from elasticsearch import Elasticsearch
|
||||
from elasticsearch import helpers
|
||||
from elasticsearch.client import ClusterClient
|
||||
|
||||
from eland.tests import *
|
||||
|
||||
@ -50,6 +51,16 @@ def _setup_data(es):
|
||||
|
||||
print("Done", index_name)
|
||||
|
||||
def _update_max_compilations_limit(es, limit="10000/1m"):
|
||||
print('Updating script.max_compilations_rate to ', limit)
|
||||
cluster_client = ClusterClient(es)
|
||||
body = {
|
||||
"transient" : {
|
||||
"script.max_compilations_rate" : limit
|
||||
}
|
||||
}
|
||||
cluster_client.put_settings(body=body)
|
||||
|
||||
|
||||
def _setup_test_mappings(es):
|
||||
# Create a complex mapping containing many Elasticsearch features
|
||||
@ -72,3 +83,4 @@ if __name__ == '__main__':
|
||||
_setup_data(es)
|
||||
_setup_test_mappings(es)
|
||||
_setup_test_nested(es)
|
||||
_update_max_compilations_limit(es)
|
||||
|
Loading…
x
Reference in New Issue
Block a user