-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add geodistance query test Signed-off-by: Fanit Kolchina <[email protected]> * Correct linting errors Signed-off-by: Fanit Kolchina <[email protected]> * Correct method name Signed-off-by: Fanit Kolchina <[email protected]> * Fixed merge conflicts Signed-off-by: Fanit Kolchina <[email protected]> --------- Signed-off-by: Fanit Kolchina <[email protected]> Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]> Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
- Loading branch information
1 parent
b553c4b
commit 51cb05a
Showing
10 changed files
with
332 additions
and
151 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 was deleted.
Oops, something went wrong.
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,28 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with cancel_after_time_interval. | ||
prologues: | ||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 | ||
status: [201] | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search with cancel_after_time_interval. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
cancel_after_time_interval: 10s | ||
method: POST | ||
response: | ||
status: 200 | ||
|
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,60 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with geo_distance query. | ||
prologues: | ||
- path: /map | ||
method: PUT | ||
request_body: | ||
payload: | ||
mappings: | ||
properties: | ||
field: | ||
type: geo_point | ||
- path: /map/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
field: | ||
lat: 74 | ||
lon: 40.71 | ||
status: [201] | ||
epilogues: | ||
- path: /map | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search for documents whose point objects are within the specified distance from the specified point. | ||
path: /{index}/_search | ||
parameters: | ||
index: map | ||
method: GET | ||
request_body: | ||
payload: | ||
query: | ||
geo_distance: | ||
distance: 50mi | ||
distance_type: arc | ||
validation_method: strict | ||
ignore_unmapped: true | ||
field: | ||
lat: 73.5 | ||
lon: 40.5 | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
max_score: 1 | ||
hits: | ||
- _index: map | ||
_score: 1 | ||
_source: | ||
field: | ||
lat: 74 | ||
lon: 40.71 | ||
|
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,56 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with match query. | ||
prologues: | ||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 | ||
status: [201] | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search with a match query object. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
method: POST | ||
request_body: | ||
payload: | ||
size: 1 | ||
query: | ||
match: | ||
director: | ||
query: Bennett Miller | ||
- synopsis: Search with a match query field. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
method: POST | ||
request_body: | ||
payload: | ||
size: 1 | ||
query: | ||
match: | ||
director: Bennett Miller | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
hits: | ||
- _index: movies | ||
_source: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 |
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,45 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with multi_match query. | ||
prologues: | ||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 | ||
status: [201] | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search with multi_match query. | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
method: POST | ||
request_body: | ||
payload: | ||
size: 1 | ||
query: | ||
multi_match: | ||
query: miller | ||
fields: [director, title^2] | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
hits: | ||
- _index: movies | ||
_source: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 |
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,28 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with phase_took. | ||
prologues: | ||
- path: /movies/_doc | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
director: Bennett Miller | ||
title: Moneyball | ||
year: 2011 | ||
status: [201] | ||
epilogues: | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search with phase_took. | ||
version: '>= 2.12' | ||
path: /{index}/_search | ||
parameters: | ||
index: movies | ||
phase_took: true | ||
method: POST | ||
response: | ||
status: 200 |
Oops, something went wrong.