-
Couldn't load subscription status.
- Fork 2.3k
Null field when getting point values for geopoint sort #18843
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c94c434
null catch
ajleong623 de82425
added tests for code coverage
ajleong623 70cf1f6
Update server/src/main/java/org/opensearch/search/internal/ExitableDi…
ajleong623 97b94f5
empty string check
ajleong623 22ab054
add yaml test
ajleong623 64983fd
add extra test
ajleong623 a8d94d9
spotless apply
ajleong623 02e9f80
random change to rerun workflow
ajleong623 02e7de5
rerun workflow
ajleong623 3651294
added getPointValues unit test
ajleong623 0a10fc2
Merge branch 'sort-bug' of https://github.com/ajleong623/OpenSearch i…
ajleong623 42b6129
non-deterministic tests
ajleong623 686f7e6
Merge branch 'opensearch-project:main' into sort-bug
ajleong623 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
39 changes: 39 additions & 0 deletions
39
rest-api-spec/src/main/resources/rest-api-spec/test/search/260_sort_geopoint.yml
This file contains hidden or 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,39 @@ | ||
| setup: | ||
| - do: | ||
| indices.create: | ||
| index: index | ||
| body: | ||
| mappings: | ||
| properties: | ||
| admin: | ||
| type: keyword | ||
| location: | ||
| type: geo_point | ||
| - do: | ||
| index: | ||
| index: index | ||
| refresh: true | ||
| body: {admin: "11", location: {lat: 48.8331, lon: 2.3264}} | ||
|
|
||
| --- | ||
| "test query then sort with geo_point distance": | ||
|
|
||
| - do: | ||
| search: | ||
| index: index | ||
| body: | ||
| query: | ||
| exists: | ||
| field: location | ||
| sort: [{_geo_distance: {location: {lat: 40.7128, lon: -74.0060}, ignore_unmapped: true, order: "desc", unit: "km"}}] | ||
| size: 4 | ||
| - match: { hits.total.value: 1 } | ||
|
|
||
| - do: | ||
| search: | ||
| index: index | ||
| body: | ||
| query: { match_all: {} } | ||
| sort: [{_geo_distance: {location: [9.227400, 49.189800], order: "desc", unit: "km", distance_type: "arc", mode: "min", ignore_unmapped: true } } ] | ||
| size: 10 | ||
| - match: { hits.total.value: 1 } |
This file contains hidden or 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 hidden or 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 hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.