-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fixes Numeric exact match queries to use range queries internally #11209
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
reta
merged 18 commits into
opensearch-project:main
from
harshavamsi:numeric_exact_match
Jan 4, 2024
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
90cf276
Updating numeric term and terms queries to use IODVQ
harshavamsi 69c13f5
Addressing comments
harshavamsi 0215078
Fix formatting
harshavamsi 03e8282
Merge branch 'main' into numeric_exact_match
harshavamsi 9b4503e
Fix changelog
harshavamsi ad366c4
Addressing more comments + adding tests
harshavamsi 2e48a4e
renaming yaml test
harshavamsi 670afb4
Adding skip for bwc
harshavamsi 3eb4316
Adding new SortedUnsignedLongDocValuesSetQuery to allow for BitIntege…
harshavamsi a89340f
Fixing some tests
harshavamsi 1dbdfdd
Remove duplicate skip
harshavamsi df900a7
Remove unused points declaration
harshavamsi 2f3d203
Change unsigned exact query to be consistent
harshavamsi e087885
Use slowExactQuery from Unsigned Set Query
harshavamsi 2742756
Merging different yaml tests into a single test
harshavamsi b54a539
Updating test case for main
harshavamsi ebba45f
Merge branch 'main' into numeric_exact_match
harshavamsi 339a681
Fix changelog
harshavamsi 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 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
165 changes: 165 additions & 0 deletions
165
rest-api-spec/src/main/resources/rest-api-spec/test/search/350_number_field_term.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,165 @@ | ||
| setup: | ||
| - skip: | ||
| features: [ "headers" ] | ||
| --- | ||
| "search on number fields with doc_values enabled": | ||
| - do: | ||
| indices.create: | ||
| index: test-iodvq | ||
| body: | ||
| mappings: | ||
| dynamic: false | ||
| properties: | ||
| byte: | ||
| type: byte | ||
| index: true | ||
| doc_values: true | ||
harshavamsi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| double: | ||
| type: double | ||
| index: true | ||
| doc_values: true | ||
| float: | ||
| type: float | ||
| index: true | ||
| doc_values: true | ||
| half_float: | ||
| type: half_float | ||
| index: true | ||
| doc_values: true | ||
| integer: | ||
| type: integer | ||
| index: true | ||
| doc_values: true | ||
| long: | ||
| type: long | ||
| index: true | ||
| doc_values: true | ||
| short: | ||
| type: short | ||
| index: true | ||
| doc_values: true | ||
| unsigned_long: | ||
| type: unsigned_long | ||
| index: true | ||
| doc_values: true | ||
|
|
||
|
|
||
| - do: | ||
| headers: | ||
| Content-Type: application/json | ||
| index: | ||
| index: "test-iodvq" | ||
| id: 1 | ||
| body: | ||
| byte: 1 | ||
| double: 1.0 | ||
| float: 1.0 | ||
| half_float: 1.0 | ||
| integer: 1 | ||
| long: 1 | ||
| short: 1 | ||
| unsigned_long: 1 | ||
harshavamsi marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - do: | ||
| headers: | ||
| Content-Type: application/json | ||
| index: | ||
| index: "test-iodvq" | ||
| id: 2 | ||
| body: | ||
| byte: 2 | ||
| double: 1.0 | ||
| float: 1.0 | ||
| half_float: 1.0 | ||
| integer: 1 | ||
| long: 1 | ||
| short: 1 | ||
| unsigned_long: 1 | ||
|
|
||
|
|
||
| - do: | ||
| headers: | ||
| Content-Type: application/json | ||
| index: | ||
| index: "test-iodvq" | ||
| id: 3 | ||
| body: | ||
| byte: 3 | ||
| double: 1.0 | ||
| float: 1.0 | ||
| half_float: 1.0 | ||
| integer: 1 | ||
| long: 1 | ||
| short: 1 | ||
| unsigned_long: 1 | ||
|
|
||
|
|
||
| - do: | ||
| indices.refresh: {} | ||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| term: | ||
| byte: 1 | ||
|
|
||
| - match: {hits.total: 1} | ||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| term: | ||
| double: 1.0 | ||
|
|
||
| - match: {hits.total: 3} | ||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| term: | ||
| float: 1.0 | ||
|
|
||
| - match: {hits.total: 3} | ||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| term: | ||
| integer: 1 | ||
|
|
||
| - match: {hits.total: 3} | ||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| term: | ||
| long: 1 | ||
|
|
||
| - match: {hits.total: 3} | ||
|
|
||
|
|
||
| - do: | ||
| search: | ||
| rest_total_hits_as_int: true | ||
| index: test-iodvq | ||
| body: | ||
| query: | ||
| terms: | ||
| byte: [1, 2] | ||
|
|
||
| - match: {hits.total: 2} | ||
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.