diff --git a/docs/category.json b/docs/category.json index cb40f1ebbcd..5e37ab389f9 100644 --- a/docs/category.json +++ b/docs/category.json @@ -2,7 +2,6 @@ "bash": [ "user/ppl/interfaces/endpoint.rst", "user/ppl/interfaces/protocol.rst", - "user/ppl/admin/settings.rst", "user/optimization/optimization.rst", "user/admin/settings.rst" ], @@ -64,5 +63,8 @@ "user/ppl/functions/string.rst", "user/ppl/general/datatypes.rst", "user/ppl/general/identifiers.rst" + ], + "bash_settings": [ + "user/ppl/admin/settings.rst" ] } diff --git a/docs/user/ppl/admin/settings.rst b/docs/user/ppl/admin/settings.rst index 389a5c24be8..5676cf605ac 100644 --- a/docs/user/ppl/admin/settings.rst +++ b/docs/user/ppl/admin/settings.rst @@ -73,22 +73,6 @@ PPL query:: "status": 400 } -Example 3 ---------- - -You can reset the setting to default value like this. - -PPL query:: - - sh$ curl -sS -H 'Content-Type: application/json' \ - ... -X PUT localhost:9200/_plugins/_query/settings \ - ... -d '{"transient" : {"plugins.ppl.enabled" : null}}' - { - "acknowledged": true, - "persistent": {}, - "transient": {} - } - plugins.query.memory_limit ========================== @@ -147,17 +131,6 @@ Change the size_limit to 1000:: "transient": {} } -Rollback to default value:: - - sh$ curl -sS -H 'Content-Type: application/json' \ - ... -X PUT localhost:9200/_plugins/_query/settings \ - ... -d '{"persistent" : {"plugins.query.size_limit" : null}}' - { - "acknowledged": true, - "persistent": {}, - "transient": {} - } - Note: the legacy settings of ``opendistro.query.size_limit`` is deprecated, it will fallback to the new settings if you request an update with the legacy name. plugins.calcite.all_join_types.allowed @@ -270,22 +243,6 @@ PPL query:: Example 2 --------- -Reset to default (unlimited) by setting to null: - -PPL query:: - - sh$ curl -sS -H 'Content-Type: application/json' \ - ... -X PUT localhost:9200/_plugins/_query/settings \ - ... -d '{"transient" : {"plugins.ppl.values.max.limit" : null}}' - { - "acknowledged": true, - "persistent": {}, - "transient": {} - } - -Example 3 ---------- - Set to 0 explicitly for unlimited values: PPL query:: diff --git a/doctest/test_docs.py b/doctest/test_docs.py index a67345bfcb4..c2d1112b584 100644 --- a/doctest/test_docs.py +++ b/doctest/test_docs.py @@ -365,6 +365,7 @@ def create_cli_suite(filepaths, parser, setup_func): # Entry point for unittest discovery def load_tests(loader, suite, ignore): tests = [] + settings_tests = [] category_manager = CategoryManager() for category_name in category_manager.get_all_categories(): @@ -372,9 +373,16 @@ def load_tests(loader, suite, ignore): if not docs: continue - tests.append(get_test_suite(category_manager, category_name, get_doc_filepaths(docs))) + suite = get_test_suite(category_manager, category_name, get_doc_filepaths(docs)) + if 'settings' in category_name: + settings_tests.append(suite) + else: + tests.append(suite) random.shuffle(tests) + if settings_tests: + random.shuffle(settings_tests) + tests.extend(settings_tests) return DocTests(tests) def get_test_suite(category_manager: CategoryManager, category_name, filepaths):