-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
196 additions
and
26 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
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
62 changes: 62 additions & 0 deletions
62
tests/default/_core/search/query/terms/array_terms_with_boost.yaml
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,62 @@ | ||
$schema: ../../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Comprehensive test suite for TermsQuery, including array of terms with boost top level parameter. | ||
version: '>= 1.2' | ||
|
||
prologues: | ||
- path: /movies | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
title: | ||
type: text | ||
genre: | ||
type: keyword | ||
director_id: | ||
type: keyword | ||
status: [200] | ||
|
||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
title: Beauty and the Beast | ||
genre: adventure | ||
status: [201] | ||
|
||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
|
||
chapters: | ||
- synopsis: Search using TermsQuery with an array of terms with boost. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
method: GET | ||
request: | ||
payload: | ||
query: | ||
terms: | ||
boost: 1.6 | ||
genre: | ||
- adventure | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
hits: | ||
- _index: movies | ||
_score: 1.6 | ||
_source: | ||
title: Beauty and the Beast | ||
genre: adventure |
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,99 @@ | ||
$schema: ../../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Comprehensive test suite for TermsQuery, including term lookup. | ||
version: '>= 1.2' | ||
|
||
prologues: | ||
- path: /movies | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
title: | ||
type: text | ||
genre: | ||
type: keyword | ||
director_id: | ||
type: keyword | ||
status: [200] | ||
|
||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
title: The Lion King | ||
genre: animation | ||
status: [201] | ||
|
||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
title: Beauty and the Beast | ||
genre: adventure | ||
status: [201] | ||
|
||
- path: /theater | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
name: | ||
type: text | ||
genre: | ||
type: keyword | ||
status: [200] | ||
|
||
- path: /theater/_doc/101 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
name: AMC | ||
genre: [adventure] | ||
status: [201] | ||
|
||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
|
||
- path: /theater | ||
method: DELETE | ||
status: [200, 404] | ||
|
||
chapters: | ||
- synopsis: Search using terms lookup. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
method: GET | ||
request: | ||
payload: | ||
query: | ||
terms: | ||
genre: | ||
index: theater | ||
id: '101' | ||
path: genre | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
hits: | ||
- _index: movies | ||
_score: 1 | ||
_source: | ||
title: Beauty and the Beast | ||
genre: adventure |