Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tests for _msearch #650

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions tests/default/_core/msearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test document multi-search.
epilogues:
- path: /books
method: DELETE
status: [200, 404]
- path: /movies
method: DELETE
status: [200, 404]
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {create: {_index: movies, _id: movie1}}
- {director: Bennett Miller, title: The Cruise, year: 1998}
- {create: {_index: movies, _id: movie2}}
- {director: Nicolas Winding Refn, title: Drive, year: 1960}
chapters:
- synopsis: Run multiple search requests in single request.
path: /_msearch
method: GET
request:
content_type: application/x-ndjson
payload:
- {index: books}
- {query: {match_all: {}}}
- {index: movies}
- {query: {match_all: {}}}
response:
status: 200
payload:
responses:
- hits:
total:
value: 1
relation: eq
hits:
- _index: books
_id: book1
- hits:
total:
value: 2
relation: eq
hits:
- _index: movies
_id: movie1
- _index: movies
_id: movie2
Loading