-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add _routing to SQL includes list #277
Conversation
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Codecov Report
@@ Coverage Diff @@
## integ-metafields-routing #277 +/- ##
===========================================================
Coverage 97.33% 97.34%
- Complexity 4408 4409 +1
===========================================================
Files 388 388
Lines 10938 10940 +2
Branches 773 774 +1
===========================================================
+ Hits 10647 10649 +2
Misses 284 284
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -99,6 +101,31 @@ public void testMetafieldIdentifierTest() throws IOException { | |||
verifyDataRows(result, rows(30, id, index, 1.0, 1.0, -2)); | |||
} | |||
|
|||
@Test | |||
public void testMetafieldIdentifierRoutingTest() throws IOException { | |||
// create an index, but the contents doesn't matter |
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.
// create an index, but the contents doesn't matter | |
// create an index, but the contents don't matter |
@@ -146,8 +145,10 @@ public Iterator<ExprValue> iterator() { | |||
if (maxScore != null) { | |||
builder.put(METADATA_FIELD_MAXSCORE, maxScore); | |||
} | |||
} else { // if (metaDataField.equals(METADATA_FIELD_SORT)) { | |||
} else if (metaDataField.equals(METADATA_FIELD_SORT)) { |
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.
maybe: use switch - case
?
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…pensearch-project#1831) * Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8) Co-authored-by: Andrew Carbonetto <[email protected]>
* Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> Signed-off-by: Mitchell Gale <[email protected]>
…pensearch-project#1843) * Add _routing to SQL includes list Signed-off-by: Andrew Carbonetto <[email protected]> * Update IT index Signed-off-by: Andrew Carbonetto <[email protected]> * Update doctest Signed-off-by: acarbonetto <[email protected]> * Add WHERE clause IT tests Signed-off-by: acarbonetto <[email protected]> * Fix IT test Signed-off-by: acarbonetto <[email protected]> * Update documentation for _routing Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Andrew Carbonetto <[email protected]> Signed-off-by: acarbonetto <[email protected]> (cherry picked from commit 876a9c8) Co-authored-by: Andrew Carbonetto <[email protected]>
Description
Add the
_routing
reserved word as a metafield accessible as an identifier from any opensearch index.Example:
Example response:
Issues Resolved
Partially resolves: sql#1478
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.