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 fields to document get response to support stored_fields param #526

Merged

Conversation

boybundit
Copy link
Contributor

Description

Add fields to document get response to support stored_fields param

Issues Resolved

To support getting document with stored_fields param

PUT /my-index
{
  "mappings": {
    "properties": {
      "demo": {
        "type" : "keyword",
        "store": true
      }
    }
  }
}
GET /my-index/_doc/1?stored_fields=foo-stored
{
    "_index": "my-index",
    "_id": "1",
    "_version": 1,
    "_seq_no": 0,
    "_primary_term": 1,
    "found": true,
    "fields": {
        "foo-stored": [
            "bar"
        ]
    }
}

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.

Copy link

codecov bot commented Apr 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.23%. Comparing base (06a6dc8) to head (a86c9e8).
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
+ Coverage   57.29%   66.23%   +8.93%     
==========================================
  Files         315      364      +49     
  Lines        9823     8585    -1238     
==========================================
+ Hits         5628     5686      +58     
+ Misses       2902     1588    -1314     
- Partials     1293     1311      +18     
Flag Coverage Δ
integration 59.56% <ø> (+8.72%) ⬆️
unit 81.64% <ø> (+68.79%) ⬆️

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

Files Coverage Δ
opensearchapi/api_document-get.go 100.00% <ø> (ø)

... and 250 files with indirect coverage changes

@boybundit boybundit force-pushed the add-fields-to-document-get-api branch 5 times, most recently from 3c78731 to 4532283 Compare April 15, 2024 07:22
Signed-off-by: Bundit Jitkonghcuen <boybundit@hotmail.com>
@boybundit boybundit force-pushed the add-fields-to-document-get-api branch from 4532283 to a86c9e8 Compare April 15, 2024 07:35
@dblock dblock merged commit 51f1e77 into opensearch-project:main Apr 15, 2024
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants