-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rest Api Compatibility] Types for Percolate Query Api (#74698)
Previously removed in #46985. The yaml test is included in this PR, but will be removed once #74689 is merged. relates #54160 relates main meta issue #51816
- Loading branch information
Showing
4 changed files
with
207 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
150 changes: 150 additions & 0 deletions
150
...ator/src/yamlRestCompatTest/resources/rest-api-spec/test/v7compat/11_basic_with_types.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
setup: | ||
- skip: | ||
version: "9.0.0 - " | ||
reason: "compatible from 8.x to 7.x" | ||
features: | ||
- "headers" | ||
- "warnings" | ||
- "allowed_warnings_regex" | ||
--- | ||
"Test percolator basics via rest": | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
indices.create: | ||
include_type_name: true | ||
index: queries_index | ||
body: | ||
mappings: | ||
queries_type: | ||
properties: | ||
query: | ||
type: percolator | ||
foo: | ||
type: keyword | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
indices.create: | ||
include_type_name: true | ||
index: documents_index | ||
body: | ||
mappings: | ||
documents_type: | ||
properties: | ||
foo: | ||
type: keyword | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
index: | ||
index: queries_index | ||
type: queries_type | ||
id: test_percolator | ||
body: | ||
query: | ||
match_all: {} | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
index: | ||
index: documents_index | ||
type: documents_type | ||
id: some_id | ||
body: | ||
foo: bar | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
indices.refresh: {} | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
search: | ||
rest_total_hits_as_int: true | ||
body: | ||
- query: | ||
percolate: | ||
field: query | ||
document: | ||
document_type: queries_type | ||
foo: bar | ||
- match: { hits.total: 1 } | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
msearch: | ||
rest_total_hits_as_int: true | ||
body: | ||
- index: queries_index | ||
- query: | ||
percolate: | ||
field: query | ||
document_type: queries_type | ||
document: | ||
foo: bar | ||
- match: { responses.0.hits.total: 1 } | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
search: | ||
rest_total_hits_as_int: true | ||
body: | ||
- query: | ||
percolate: | ||
field: query | ||
index: documents_index | ||
type: documents_type | ||
id: some_id | ||
- match: { hits.total: 1 } | ||
|
||
- do: | ||
headers: | ||
Content-Type: "application/vnd.elasticsearch+json;compatible-with=7" | ||
Accept: "application/vnd.elasticsearch+json;compatible-with=7" | ||
allowed_warnings_regex: | ||
- "\\[types removal\\].*" | ||
msearch: | ||
rest_total_hits_as_int: true | ||
body: | ||
- index: queries_index | ||
- query: | ||
percolate: | ||
field: query | ||
index: documents_index | ||
type: documents_type | ||
id: some_id | ||
- match: { responses.0.hits.total: 1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters