diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/320_disallow_queries.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/320_disallow_queries.yml index e0b6827aa7995..7135c8642736c 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/search/320_disallow_queries.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/320_disallow_queries.yml @@ -55,94 +55,7 @@ teardown: cluster.get_settings: flat_settings: true - - match: {search.allow_expensive_queries: null} - - ### Prefix - - do: - search: - index: test - body: - query: - prefix: - text: - value: out - - - match: { hits.total.value: 3 } - - ### Fuzzy - - do: - search: - index: test - body: - query: - fuzzy: - text: - value: outwide - - - match: { hits.total.value: 3 } - - - ### Regexp - - do: - search: - index: test - body: - query: - regexp: - text: - value: .*ou.*id.* - - - match: { hits.total.value: 3 } - - ### Wildcard - - do: - search: - index: test - body: - query: - wildcard: - text: - value: out?ide - - - match: { hits.total.value: 3 } - - ### Range on text - - do: - search: - index: test - body: - query: - range: - text: - gte: "theres" - - - match: { hits.total.value: 2 } - - ### Range on keyword - - do: - search: - index: test - body: - query: - range: - text.raw: - gte : "Outside it is cold and wet" - - - match: { hits.total.value: 2 } - - ### Nested - - do: - search: - index: test - body: - query: - nested: - path: "nested1" - query: - bool: - must: [{"match": {"nested1.foo": "bar2"}}] - - - match: { hits.total.value: 1 } + - is_false: search.allow_expensive_queries ### Update setting to false - do: @@ -232,99 +145,3 @@ teardown: query: bool: must: [{"match" : {"nested1.foo" : "bar2"}}] - - ### Revert setting to true - - do: - cluster.put_settings: - body: - transient: - search.allow_expensive_queries: "true" - flat_settings: true - - - match: {transient: {search.allow_expensive_queries: "true"}} - - ### Prefix - - do: - search: - index: test - body: - query: - prefix: - text: - value: out - - - match: { hits.total.value: 3 } - - ### Fuzzy - - do: - search: - index: test - body: - query: - fuzzy: - text: - value: outwide - - - match: { hits.total.value: 3 } - - ### Regexp - - do: - search: - index: test - body: - query: - regexp: - text: - value: .*ou.*id.* - - - match: { hits.total.value: 3 } - - ### Wildcard - - do: - search: - index: test - body: - query: - wildcard: - text: - value: out?ide - - - match: { hits.total.value: 3 } - - ### Range on text - - do: - search: - index: test - body: - query: - range: - text: - gte: "theres" - - - match: { hits.total.value: 2 } - - ### Range on keyword - - do: - search: - index: test - body: - query: - range: - text.raw: - gte: "Outside it is cold and wet" - - - match: { hits.total.value: 2 } - - ### Nested - - do: - search: - index: test - body: - query: - nested: - path: "nested1" - query: - bool: - must: [{"match": {"nested1.foo": "bar2"}}] - - - match: { hits.total.value: 1 }