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

Adding support for docvalue_fields in msearch #1429

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

jainankitk
Copy link
Contributor

Description

Adds support for docvalue_fields in msearch

Issues Resolved

#1428

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.

Signed-off-by: Ankit Jain <akjain@amazon.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>

MsearchResponse<ShopItem> response = sendMSearchRequest(index, List.of(sortedItemsQuery));
assertEquals(1, response.responses().size());
assertEquals(3, response.responses().get(0).result().hits().hits().size());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Integration tests are failing on the .result() call as the response is a failure for some reason

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the integration tests, essentially doc value fields are not allowed on text fields (name). Changing that to quantity fixed the issue

Signed-off-by: Ankit Jain <akjain@amazon.com>
@Xtansia Xtansia merged commit 0521c3c into opensearch-project:main Feb 13, 2025
38 checks passed
@jainankitk jainankitk deleted the osj-1428 branch February 13, 2025 21:25
@Xtansia Xtansia added the backport 2.x Backport to 2.x branch label Feb 13, 2025
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/opensearch-java/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/opensearch-java/backport-2.x
# Create a new branch
git switch --create backport/backport-1429-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0521c3c595e886dc0119ea3f652d48a5da43aaea
# Push it to GitHub
git push --set-upstream origin backport/backport-1429-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/opensearch-java/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1429-to-2.x.

@Xtansia
Copy link
Collaborator

Xtansia commented Feb 13, 2025

@jainankitk Could you please follow the above instructions to backport this PR to 2.x?

jainankitk added a commit to jainankitk/opensearch-java that referenced this pull request Feb 13, 2025
* Adding support for docvalue_fields in msearch

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Add changelog and spotless fixes

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Fixing integration test failures

Signed-off-by: Ankit Jain <akjain@amazon.com>

---------

Signed-off-by: Ankit Jain <akjain@amazon.com>
(cherry picked from commit 0521c3c)
@jainankitk
Copy link
Contributor Author

@jainankitk Could you please follow the above instructions to backport this PR to 2.x?

#1432

jainankitk added a commit to jainankitk/opensearch-java that referenced this pull request Feb 13, 2025
Signed-off-by: Ankit Jain <akjain@amazon.com>
Xtansia pushed a commit that referenced this pull request Feb 13, 2025
* Adding support for docvalue_fields in msearch

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Add changelog and spotless fixes

Signed-off-by: Ankit Jain <akjain@amazon.com>

* Fixing integration test failures

Signed-off-by: Ankit Jain <akjain@amazon.com>

---------

Signed-off-by: Ankit Jain <akjain@amazon.com>
(cherry picked from commit 0521c3c)
Xtansia pushed a commit that referenced this pull request Feb 13, 2025
Signed-off-by: Ankit Jain <akjain@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants