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 "weights" param for combination technique #234

Closed

Conversation

martin-gaievski
Copy link
Member

Description

Adding parameter "weights" for combination technique in normalization processor. Weights are use to multiply scores for each sub-query from the Hybrid search query. Weights are mapped to sub-query based on position (index), if there are less weights provided we use "1.0" for the rest of sub-query scores. If there are more weights provided we take first N and ignore the rest.

Parameter is set as part of the search pipeline, example of such request:

{
    "description": "Post processor for hybrid search",
    "phase_results_processors": [
        {
            "normalization-processor": {
                "normalization": {
                    "technique": "min_max"
                },
                "combination": {
                    "technique": "arithmetic_mean",
                    "parameters": {
                        "weights": [
                            0.4, 0.7
                        ]
                    }
                }
            }
        }
    ]
}

Issues Resolved

#228, part of solution for #126

Check List

  • All tests pass
  • 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.

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #234 (de773ff) into feature/normalization (2224f1f) will decrease coverage by 0.48%.
The diff coverage is 75.00%.

@@                     Coverage Diff                     @@
##             feature/normalization     #234      +/-   ##
===========================================================
- Coverage                    85.55%   85.07%   -0.48%     
- Complexity                     296      304       +8     
===========================================================
  Files                           24       24              
  Lines                          872      898      +26     
  Branches                       134      139       +5     
===========================================================
+ Hits                           746      764      +18     
- Misses                          67       70       +3     
- Partials                        59       64       +5     
Files Changed Coverage Δ
...ation/ArithmeticMeanScoreCombinationTechnique.java 69.69% <66.66%> (-10.31%) ⬇️
...processor/combination/ScoreCombinationFactory.java 100.00% <100.00%> (ø)
...ocessor/factory/NormalizationProcessorFactory.java 100.00% <100.00%> (ø)

@martin-gaievski martin-gaievski deleted the add_algo_params_for_combination branch July 27, 2023 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant