Skip to content
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) #1762

Closed

Conversation

acarbonetto
Copy link
Collaborator

Description

Add the _routing reserved word as a metafield accessible as an identifier from any opensearch index.

Example:

select _id, _index, _routing, int0 from calcs limit 5

Example response:

        [
            "1",
            "calcs",
            "[xoyIAOdqQsS74x2yKSgiEQ][calcs][0]",
            1
        ],

Issues Resolved

Partially resolves: sql#1478

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Merging #1762 (aca7694) into main (c7dfdb3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##               main    #1762   +/-   ##
=========================================
  Coverage     97.29%   97.29%           
- Complexity     4408     4409    +1     
=========================================
  Files           388      388           
  Lines         10944    10946    +2     
  Branches        774      775    +1     
=========================================
+ Hits          10648    10650    +2     
  Misses          289      289           
  Partials          7        7           
Flag Coverage Δ
sql-engine 97.29% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...search/sql/opensearch/storage/OpenSearchIndex.java 100.00% <ø> (ø)
...ch/sql/opensearch/response/OpenSearchResponse.java 100.00% <100.00%> (ø)

Copy link
Collaborator

@Yury-Fridlyand Yury-Fridlyand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be used in WHERE? Can you update docs (doctest) as well?

@acarbonetto acarbonetto force-pushed the integ-metafields-routing branch from aca7694 to 34cad6e Compare June 23, 2023 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow individual shards to be targeted during query execution [FEATURE]
2 participants