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

Fixing multiple issues reported in #497 #524

Conversation

martin-gaievski
Copy link
Member

@martin-gaievski martin-gaievski commented Dec 27, 2023

Description

Fixed multiple issue in scope of this PR:

  • Allow multiple identical sub-queries in hybrid query
  • Allow total_hits flag usage
  • Move check for mismatch of number of docs in fetch and query results to earlier stage, so normalization is not even called. current behavior is to throw an exception and fail search query

Issues Resolved

#497

Check List

  • New functionality includes testing.
    • All tests pass
  • 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.

@martin-gaievski martin-gaievski added Bug Fixes Changes to a system or product designed to handle a programming bug/glitch v2.12.0 Issues targeting release v2.12.0 labels Dec 27, 2023
Copy link

codecov bot commented Dec 27, 2023

Codecov Report

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

Comparison is base (5daddfd) 84.55% compared to head (7ea7d90) 84.33%.

Files Patch % Lines
...ensearch/neuralsearch/query/HybridQueryScorer.java 70.00% 4 Missing and 2 partials ⚠️
...arch/processor/NormalizationProcessorWorkflow.java 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #524      +/-   ##
============================================
- Coverage     84.55%   84.33%   -0.22%     
- Complexity      532      533       +1     
============================================
  Files            40       40              
  Lines          1547     1564      +17     
  Branches        244      244              
============================================
+ Hits           1308     1319      +11     
- Misses          128      133       +5     
- Partials        111      112       +1     

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

@martin-gaievski martin-gaievski changed the title Fixed multiple issues in Hybrid Query Multiple identical subqueries in Hybrid query Dec 27, 2023
@martin-gaievski martin-gaievski force-pushed the fix_multiple_issues_hybrid_query branch 2 times, most recently from 807ea6a to 534b2eb Compare December 28, 2023 17:37
@navneet1v
Copy link
Collaborator

Update the PR description to:
Fixing multiple issues reported in #497.

same for the change log.

CHANGELOG.md Outdated Show resolved Hide resolved
@navneet1v
Copy link
Collaborator

Please add an IT for case when there are same queries in hyrbid query clause.

@martin-gaievski martin-gaievski changed the title Multiple identical subqueries in Hybrid query Fixing multiple issues reported in #497 Dec 28, 2023
@martin-gaievski
Copy link
Member Author

Please add an IT for case when there are same queries in hyrbid query clause.

added IT as requested

@martin-gaievski martin-gaievski force-pushed the fix_multiple_issues_hybrid_query branch from 1ed9285 to 500b81c Compare December 28, 2023 20:26
@martin-gaievski martin-gaievski force-pushed the fix_multiple_issues_hybrid_query branch from 500b81c to c462f4d Compare December 28, 2023 20:37
Signed-off-by: Martin Gaievski <[email protected]>
@martin-gaievski martin-gaievski force-pushed the fix_multiple_issues_hybrid_query branch from c462f4d to 6801844 Compare December 28, 2023 20:41
@martin-gaievski martin-gaievski added the backport 2.x Label will add auto workflow to backport PR to 2.x branch label Dec 29, 2023
Signed-off-by: Martin Gaievski <[email protected]>
@martin-gaievski martin-gaievski merged commit 585fbbe into opensearch-project:main Dec 29, 2023
18 of 20 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-524-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 585fbbe0da23bdb827bf012a85d6b2dc9af78c11
# Push it to GitHub
git push --set-upstream origin backport/backport-524-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-524-to-2.x.

martin-gaievski added a commit to martin-gaievski/neural-search that referenced this pull request Jan 2, 2024
…-project#524)

* Allow multiple identical sub-queries in hybrid query, removed validation for total hits

Signed-off-by: Martin Gaievski <[email protected]>
(cherry picked from commit 585fbbe)
martin-gaievski added a commit to martin-gaievski/neural-search that referenced this pull request Jan 2, 2024
…-project#524)

* Allow multiple identical sub-queries in hybrid query, removed validation for total hits

Signed-off-by: Martin Gaievski <[email protected]>
(cherry picked from commit 585fbbe)
Signed-off-by: Martin Gaievski <[email protected]>
martin-gaievski added a commit that referenced this pull request Jan 2, 2024
* Allow multiple identical sub-queries in hybrid query, removed validation for total hits


(cherry picked from commit 585fbbe)

Signed-off-by: Martin Gaievski <[email protected]>
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 Bug Fixes Changes to a system or product designed to handle a programming bug/glitch v2.12.0 Issues targeting release v2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants