Skip to content

Issue-71: Phrase matching field weights should be derived from the active provider#81

Draft
moraleida wants to merge 1 commit intomainfrom
feature/issue-71/derive-phrase-matching-weights
Draft

Issue-71: Phrase matching field weights should be derived from the active provider#81
moraleida wants to merge 1 commit intomainfrom
feature/issue-71/derive-phrase-matching-weights

Conversation

@moraleida
Copy link
Contributor

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

  • Do not hardcode a list of fields and weights for phrase matching.
  • Derive the field weights from the existing query configuration, ensuring they are consistent with the active provider or previously defined settings.

@moraleida moraleida added elasticsearch Requires understanding Elasticsearch enhancement New feature or request labels Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

elasticsearch Requires understanding Elasticsearch enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phrase matching field weights should be derived from the active provider

1 participant