-
Notifications
You must be signed in to change notification settings - Fork 53
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
Update spec and add tests for xy, geo shape, and geo bounding box query #531
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8a03739
Adds xy shape query spec and test
kolchfa-aws 481ccea
Update spec and add tests for geo bounding box and geo shape
kolchfa-aws c6ba75a
Address linter errors
kolchfa-aws 064ab37
Add version added to xy field types and query
kolchfa-aws b5c6fdc
Fix lint errors
kolchfa-aws bb07601
Remove ShapeQuery from spec and make list ordered
kolchfa-aws d4e7a3b
Merge branch 'main' into shape-update
kolchfa-aws 92a19f6
Extract objects into refs
kolchfa-aws 842c24e
Extract last object and add changelog entry
kolchfa-aws 71eb9e7
Implement code review comments
kolchfa-aws 2a9f579
Resolve merge conflicts
kolchfa-aws 70ac83a
Fix lint errors
kolchfa-aws 17133e3
Apply suggestions from code review
kolchfa-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 geo_bounding_box query. | ||
prologues: | ||
- path: /point_index | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
field: | ||
type: geo_point | ||
- path: /point_index/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
field: | ||
lat: 74 | ||
lon: 40 | ||
status: [201] | ||
epilogues: | ||
- path: /point_index | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search point_index for documents whose point objects are within the specified bounding box. | ||
path: /{index}/_search | ||
parameters: | ||
index: point_index | ||
method: GET | ||
request: | ||
payload: | ||
query: | ||
geo_bounding_box: | ||
field: | ||
top: 75 | ||
left: 28 | ||
bottom: 73 | ||
right: 41 | ||
validation_method: strict | ||
type: memory | ||
ignore_unmapped: false | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
max_score: 1 | ||
hits: | ||
- _index: point_index | ||
_score: 1 | ||
_source: | ||
field: | ||
lat: 74 | ||
lon: 40 |
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,52 @@ | ||
$schema: ../../../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test search endpoint with geo_shape query. | ||
prologues: | ||
- path: /cinemas | ||
method: PUT | ||
request: | ||
payload: | ||
mappings: | ||
properties: | ||
location: | ||
type: geo_point | ||
- path: /cinemas/_doc/1 | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
payload: | ||
location: [0.5, 3] | ||
status: [201] | ||
epilogues: | ||
- path: /cinemas | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Search cinemas for documents whose point objects are within the specified envelope. | ||
path: /{index}/_search | ||
parameters: | ||
index: cinemas | ||
method: GET | ||
request: | ||
payload: | ||
query: | ||
geo_shape: | ||
location: | ||
shape: | ||
type: envelope | ||
coordinates: [[0, 6], [1, 2]] | ||
response: | ||
status: 200 | ||
payload: | ||
timed_out: false | ||
hits: | ||
total: | ||
value: 1 | ||
relation: eq | ||
max_score: 0 | ||
hits: | ||
- _index: cinemas | ||
_score: 0 | ||
_source: | ||
location: [0.5, 3] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this one, but would be nice to use the cinema/movie/books here too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done #562