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

[Backport main manually][bug fix] Fix async actions are left in neural_sparse query (#438) #479

Merged

Conversation

zhichao-aws
Copy link
Member

@zhichao-aws zhichao-aws commented Oct 30, 2023

Description

Backport #438 manually
cherry picked from commit 51e6c00

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as 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.

…ch-project#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)
@zhichao-aws
Copy link
Member Author

The automatic backport workflow failed, create backport manually. Failure reason: in 2.x pr there are max_token_score related changes, but in main we don't have max_token_score. Delete those lines.

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (c3e336f) 84.37% compared to head (48b1a40) 84.38%.
Report is 2 commits behind head on main.

Files Patch % Lines
...h/neuralsearch/query/NeuralSparseQueryBuilder.java 81.25% 0 Missing and 3 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #479      +/-   ##
============================================
+ Coverage     84.37%   84.38%   +0.01%     
- Complexity      498      506       +8     
============================================
  Files            40       40              
  Lines          1491     1505      +14     
  Branches        228      234       +6     
============================================
+ Hits           1258     1270      +12     
  Misses          133      133              
- Partials        100      102       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@navneet1v
Copy link
Collaborator

@zhichao-aws please update the changelog.

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
@zhichao-aws
Copy link
Member Author

@zhichao-aws please update the changelog.

Done

@zhichao-aws
Copy link
Member Author

@navneet1v @martin-gaievski Need one more approve, could you please help review this?

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
@zane-neo zane-neo merged commit a72df66 into opensearch-project:main Nov 17, 2023
14 of 15 checks passed
krishy91 pushed a commit to krishy91/neural-search that referenced this pull request Dec 20, 2023
…l_sparse query (opensearch-project#438) (opensearch-project#479)

* [bug fix] Fix async actions are left in neural_sparse query (opensearch-project#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
krishy91 pushed a commit to krishy91/neural-search that referenced this pull request Jan 4, 2024
…l_sparse query (opensearch-project#438) (opensearch-project#479)

* [bug fix] Fix async actions are left in neural_sparse query (opensearch-project#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
zane-neo pushed a commit that referenced this pull request Mar 1, 2024
* Handle case with nested list of objects

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* fix validateEmbeddingsFieldValues Method

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* spotless formatting

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Onboard jenkins prod docker images on github actions (#483)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Update dependency org.json:json to v20231013 (#481)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* [Backport main manually][bug fix] Fix async actions are left in neural_sparse query (#438) (#479)

* [bug fix] Fix async actions are left in neural_sparse query (#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed exception for case when Hybrid query being wrapped into bool query (#490)

* Adding null check for case when hybrid query wrapped into bool query

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed Hybrid query for cases when it's wrapped into other compound queries (#498)

* Fixed nested field case

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added the github action to copy the attached issues label to PR. (#504)

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added support for jdk-21 (#500)

* Added support for jdk-21

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Add unit tests + small fixes

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* fix indentation

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* remove unused code + add 2nd level nesting test

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* add integration test for list of nested objects

Signed-off-by: krishy91 <crgkc.r@gmail.com>

---------

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: krishy91 <crgkc.r@gmail.com>
Co-authored-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: Martin Gaievski <gaievski@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 1, 2024
* Handle case with nested list of objects

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* fix validateEmbeddingsFieldValues Method

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* spotless formatting

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Onboard jenkins prod docker images on github actions (#483)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Update dependency org.json:json to v20231013 (#481)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* [Backport main manually][bug fix] Fix async actions are left in neural_sparse query (#438) (#479)

* [bug fix] Fix async actions are left in neural_sparse query (#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed exception for case when Hybrid query being wrapped into bool query (#490)

* Adding null check for case when hybrid query wrapped into bool query

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed Hybrid query for cases when it's wrapped into other compound queries (#498)

* Fixed nested field case

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added the github action to copy the attached issues label to PR. (#504)

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added support for jdk-21 (#500)

* Added support for jdk-21

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Add unit tests + small fixes

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* fix indentation

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* remove unused code + add 2nd level nesting test

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* add integration test for list of nested objects

Signed-off-by: krishy91 <crgkc.r@gmail.com>

---------

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: krishy91 <crgkc.r@gmail.com>
Co-authored-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: Martin Gaievski <gaievski@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
(cherry picked from commit ea49d3c)
vibrantvarun pushed a commit that referenced this pull request Mar 5, 2024
* Handle case with nested list of objects

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* fix validateEmbeddingsFieldValues Method

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* spotless formatting

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Onboard jenkins prod docker images on github actions (#483)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Update dependency org.json:json to v20231013 (#481)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* [Backport main manually][bug fix] Fix async actions are left in neural_sparse query (#438) (#479)

* [bug fix] Fix async actions are left in neural_sparse query (#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed exception for case when Hybrid query being wrapped into bool query (#490)

* Adding null check for case when hybrid query wrapped into bool query

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed Hybrid query for cases when it's wrapped into other compound queries (#498)

* Fixed nested field case

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added the github action to copy the attached issues label to PR. (#504)

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added support for jdk-21 (#500)

* Added support for jdk-21

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Add unit tests + small fixes

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* fix indentation

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* remove unused code + add 2nd level nesting test

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* add integration test for list of nested objects

Signed-off-by: krishy91 <crgkc.r@gmail.com>

---------

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: krishy91 <crgkc.r@gmail.com>
Co-authored-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: Martin Gaievski <gaievski@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
(cherry picked from commit ea49d3c)

Co-authored-by: Gopala-Krishna Char <crgkc.r@gmail.com>
yuye-aws pushed a commit to yuye-aws/neural-search that referenced this pull request Mar 8, 2024
* Handle case with nested list of objects

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* fix validateEmbeddingsFieldValues Method

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* spotless formatting

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Onboard jenkins prod docker images on github actions (opensearch-project#483)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Update dependency org.json:json to v20231013 (opensearch-project#481)

Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* [Backport main manually][bug fix] Fix async actions are left in neural_sparse query (opensearch-project#438) (opensearch-project#479)

* [bug fix] Fix async actions are left in neural_sparse query (opensearch-project#438)

* add serialization and deserialization

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* hash, equals. + UT

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add test

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
(cherry picked from commit 51e6c00)

* rm max_token_score

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* add changelog

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

* tidy

Signed-off-by: zhichao-aws <zhichaog@amazon.com>

---------

Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed exception for case when Hybrid query being wrapped into bool query (opensearch-project#490)

* Adding null check for case when hybrid query wrapped into bool query

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Fixed Hybrid query for cases when it's wrapped into other compound queries (opensearch-project#498)

* Fixed nested field case

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added the github action to copy the attached issues label to PR. (opensearch-project#504)

Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Added support for jdk-21 (opensearch-project#500)

* Added support for jdk-21

Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>

* Add unit tests + small fixes

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* fix indentation

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* remove unused code + add 2nd level nesting test

Signed-off-by: krishy91 <crgkc.r@gmail.com>

* add integration test for list of nested objects

Signed-off-by: krishy91 <crgkc.r@gmail.com>

---------

Signed-off-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: zhichao-aws <zhichaog@amazon.com>
Signed-off-by: Martin Gaievski <gaievski@amazon.com>
Signed-off-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: krishy91 <crgkc.r@gmail.com>
Co-authored-by: Gopala-Krishna.Char <gopala-krishna.char@intrafind.de>
Co-authored-by: Peter Zhu <zhujiaxi@amazon.com>
Co-authored-by: mend-for-github-com[bot] <50673670+mend-for-github-com[bot]@users.noreply.github.com>
Co-authored-by: zhichao-aws <zhichaog@amazon.com>
Co-authored-by: Martin Gaievski <gaievski@amazon.com>
Co-authored-by: Navneet Verma <navneev@amazon.com>
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
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.

5 participants