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

Clean up unused validateFieldName() and use existing methods for TextEmbeddingProcessorIT #1074

Merged

Conversation

yizheliu-amazon
Copy link
Contributor

Description

Clean up unused validateFieldName() and use existing methods getHitCount() and getFirstInnerHit() for TextEmbeddingProcessorIT to simplify test code and fix build for backport 2.x

Related Issues

Using existing methods getHitCount() and getFirstInnerHit() may help to fix build error in #1071: https://github.com/opensearch-project/neural-search/actions/runs/12664516471/job/35292787707?pr=1071

/__w/neural-search/neural-search/src/test/java/org/opensearch/neuralsearch/processor/TextEmbeddingProcessorIT.java:297: error: cannot find symbol
            Map<String, Object> innerHitDetails = listOfHits.getFirst();
                                                            ^
  symbol:   method getFirst()
  location: variable listOfHits of type List<Map<String,Object>>

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@yizheliu-amazon
Copy link
Contributor Author

CHANGELOG can be skipped

Copy link
Collaborator

@heemin32 heemin32 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@heemin32 heemin32 added the backport 2.x Label will add auto workflow to backport PR to 2.x branch label Jan 8, 2025
@heemin32 heemin32 merged commit fea0a7f into opensearch-project:main Jan 8, 2025
53 of 56 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1074-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 fea0a7f0ababf20e9eb421e311431cb49c10cfe5
# Push it to GitHub
git push --set-upstream origin backport/backport-1074-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

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

@yizheliu-amazon yizheliu-amazon deleted the remove-unused-methd branch January 8, 2025 18:05
yizheliu-amazon added a commit to yizheliu-amazon/neural-search that referenced this pull request Jan 8, 2025
yizheliu-amazon added a commit to yizheliu-amazon/neural-search that referenced this pull request Jan 10, 2025
junqiu-lei pushed a commit that referenced this pull request Jan 10, 2025
… due to document has dot in field name (#1076)

* Fix bug where document embedding fails to be generated due to document has dot in field name (#1062)

* Fix bug where document embedding fails to be generated due to document has dot in field name

Signed-off-by: Yizhe Liu <[email protected]>

* Address comments

Signed-off-by: Yizhe Liu <[email protected]>

---------

Signed-off-by: Yizhe Liu <[email protected]>

* Clean up unused validateFieldName() and use existing methods for TextEmbeddingProcessorIT (#1074)

Signed-off-by: Yizhe Liu <[email protected]>

---------

Signed-off-by: Yizhe Liu <[email protected]>
martin-gaievski pushed a commit that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Label will add auto workflow to backport PR to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants