-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Fanit Kolchina <[email protected]>
- Loading branch information
1 parent
188413c
commit fec9244
Showing
2 changed files
with
68 additions
and
0 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
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 geodistance query. | ||
prologues: | ||
- path: /testindex1 | ||
method: PUT | ||
request_body: | ||
payload: | ||
mappings: | ||
properties: | ||
field: | ||
type: geo_point | ||
- path: /testindex1/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request_body: | ||
payload: | ||
field: | ||
lat: 74.00 | ||
lon: 40.71 | ||
status: [201] | ||
epilogues: | ||
- path: /testindex1 | ||
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: testindex1 | ||
method: GET | ||
request_body: | ||
payload: | ||
query: | ||
geo_distance: | ||
distance: "50mi" | ||
Check failure on line 37 in tests/_core/geodistance_query.yaml GitHub Actions / lint
|
||
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: testindex1 | ||
_score: 1 | ||
_source: | ||
field: | ||
lat: 74 | ||
lon: 40.71 | ||
|