Issue-71: Phrase matching field weights should be derived from the active provider#81
Draft
Issue-71: Phrase matching field weights should be derived from the active provider#81
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #71
This PR addresses the issue where field weights in Phrase Matched queries are not consistent with those set by the active provider or defined in code. As per the discussion in this feedback, it is important that the weights of content remain consistent whether the phrase matching feature is enabled or not.
Description
The current implementation hardcodes a list of fields and weights for phrase matching queries. This approach does not consider the field weights that might be set by the active provider or defined elsewhere in the code. To ensure consistency, this PR proposes deriving the field weights from the existing query. This means utilizing the fields and weights as configured through the plugin/adapter, including any filters that have already been applied.
Use Case
This change is particularly relevant when the phrase matching feature is enabled. If a user makes a query that activates the phrase matching query, the field weights should remain consistent with those set prior to the activation of phrase matching. By deriving the field weights directly from the active provider or configuration, we ensure that the search results remain consistent and predictable.
Acceptance Criteria