File tree 6 files changed +86
-39
lines changed
6 files changed +86
-39
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
75
75
- Fixed request schema for ` PATCH /_plugins/_security/api/nodesdn ` ([ #731 ] ( https://github.com/opensearch-project/opensearch-api-specification/pull/731 ) )
76
76
- Fixed response schema for ` GET /_plugins/_security/api/nodesdn/{cluster_name} ` ([ #731 ] ( https://github.com/opensearch-project/opensearch-api-specification/pull/731 ) )
77
77
- Fixed request body for ` /_search/scroll/{scroll_id} ` ([ #732 ] ( https://github.com/opensearch-project/opensearch-api-specification/pull/732 ) )
78
+ - Fixed type in ` _msearch/template ` ([ #735 ] ( https://github.com/opensearch-project/opensearch-api-specification/pull/735 ) )
78
79
79
80
### Changed
80
81
- Changed ` tasks._common:TaskInfo ` and ` tasks._common:TaskGroup ` to be composed of a ` tasks._common:TaskInfoBase ` ([ #683 ] ( https://github.com/opensearch-project/opensearch-api-specification/pull/683 ) )
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ components:
25
25
The value is the variable value.
26
26
type : object
27
27
additionalProperties :
28
- type : object
28
+ oneOf :
29
+ - type : string
30
+ - type : object
29
31
profile :
30
32
description : When `true`, provides a profile for the query execution.
31
33
type : boolean
Original file line number Diff line number Diff line change 1
- $schema : ../../../json_schemas/test_story.schema.yaml
1
+ $schema : ../../../../ json_schemas/test_story.schema.yaml
2
2
3
3
description : Test document multi-search.
4
4
epilogues :
@@ -25,7 +25,9 @@ prologues:
25
25
chapters :
26
26
- synopsis : Run multiple search requests in single request (GET).
27
27
path : /_msearch
28
- method : GET
28
+ method :
29
+ - GET
30
+ - POST
29
31
request :
30
32
content_type : application/x-ndjson
31
33
payload :
@@ -52,34 +54,4 @@ chapters:
52
54
- _index : movies
53
55
_id : movie1
54
56
- _index : movies
55
- _id : movie2
56
- - synopsis : Run multiple search requests in single request (POST).
57
- path : /_msearch
58
- method : POST
59
- request :
60
- content_type : application/x-ndjson
61
- payload :
62
- - {index: movies}
63
- - {query: {match_all: {}}}
64
- - {index: books}
65
- - {query: {match_all: {}}}
66
- response :
67
- status : 200
68
- payload :
69
- responses :
70
- - hits :
71
- total :
72
- value : 2
73
- relation : eq
74
- hits :
75
- - _index : movies
76
- _id : movie1
77
- - _index : movies
78
- _id : movie2
79
- - hits :
80
- total :
81
- value : 1
82
- relation : eq
83
- hits :
84
- - _index : books
85
- _id : book1
57
+ _id : movie2
Original file line number Diff line number Diff line change
1
+ $schema : ../../../../json_schemas/test_story.schema.yaml
2
+
3
+ description : Test _msearch/template APIs.
4
+ prologues :
5
+ - path : /_bulk
6
+ method : POST
7
+ parameters :
8
+ refresh : true
9
+ request :
10
+ content_type : application/x-ndjson
11
+ payload :
12
+ - {create: {_index: books, _id: book1}}
13
+ - {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
14
+ - {create: {_index: books, _id: book2}}
15
+ - {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991}
16
+ - {create: {_index: books, _id: book3}}
17
+ - {author: George Orwell, title: '1984', year: 1949}
18
+ epilogues :
19
+ - path : /books
20
+ method : DELETE
21
+ status : [200, 404]
22
+
23
+ chapters :
24
+ - synopsis : Perform a multi-search template query using a GET request.
25
+ path : /_msearch/template
26
+ method :
27
+ - GET
28
+ - POST
29
+ request :
30
+ content_type : application/x-ndjson
31
+ payload :
32
+ - {index: books}
33
+ - {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: Mockingbird}}
34
+ - {index: books}
35
+ - {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: Beast}}
Original file line number Diff line number Diff line change 1
- $schema : ../../../json_schemas/test_story.schema.yaml
1
+ $schema : ../../../../ json_schemas/test_story.schema.yaml
2
2
3
3
description : Test endpoints relevant to the lifecycle of an index, including multi-get and multi-search operations.
4
4
prologues :
@@ -22,7 +22,9 @@ epilogues:
22
22
chapters :
23
23
- synopsis : Perform a `_msearch` request to execute multiple search queries in a single call.
24
24
path : /{index}/_msearch
25
- method : POST
25
+ method :
26
+ - GET
27
+ - POST
26
28
parameters :
27
29
index : books
28
30
request :
@@ -31,6 +33,4 @@ chapters:
31
33
- {index: books}
32
34
- {query: {match: {title: To Kill a Mockingbird}}}
33
35
- {index: books}
34
- - {query: {match: {title: The Cruise}}}
35
- response :
36
- status : 200
36
+ - {query: {match: {title: The Cruise}}}
Original file line number Diff line number Diff line change
1
+ $schema : ../../../../json_schemas/test_story.schema.yaml
2
+
3
+ description : Test _msearch/template APIs.
4
+ prologues :
5
+ - path : /_bulk
6
+ method : POST
7
+ parameters :
8
+ refresh : true
9
+ request :
10
+ content_type : application/x-ndjson
11
+ payload :
12
+ - {create: {_index: books, _id: book1}}
13
+ - {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
14
+ - {create: {_index: books, _id: book2}}
15
+ - {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991}
16
+ - {create: {_index: books, _id: book3}}
17
+ - {author: George Orwell, title: '1984', year: 1949}
18
+ epilogues :
19
+ - path : /books
20
+ method : DELETE
21
+ status : [200, 404]
22
+
23
+ chapters :
24
+ - synopsis : Perform a multi-search template query using a GET request.
25
+ path : /{index}/_msearch/template
26
+ parameters :
27
+ index : books
28
+ method :
29
+ - GET
30
+ - POST
31
+ request :
32
+ content_type : application/x-ndjson
33
+ payload :
34
+ - {index: books}
35
+ - {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: Mockingbird}}
36
+ - {index: books}
37
+ - {source: '{"query": {"match": {"title": "{{title}}"}}}', params: {title: Beast}}
You can’t perform that action at this time.
0 commit comments