alleyinteractive / alleyinteractive/elasticsearch-extensions

Phrase matching field weights should be derived from the active provider

Open
#71 0 comments 0 reactions 0 assignees View on GitHub
elasticsearch enhancement php
Dominant language
PHP
Stars
5
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description

Stemming from [this feedback ](https://github.com/alleyinteractive/elasticsearch-extensions/pull/67#discussion_r1440394573) from @renatonascalves, the field weights that are used in the Phrase Matched queries differ from those that may be set in code or otherwise by the active provider. While this may or may not present a big issue, the weights of the content should be consistent regardless of whether the phrase matching feature is enabled.

### Use Case

When the phrase matching feature is enabled and a user is making a query that causes the phrase matching query to be executed, the field value factor weights should be the same as they were before the phrase matching query was activated. That is, the field weights should be derived from the active provider/configuration instead of defining its own ([which can be seen here](https://github.com/alleyinteractive/elasticsearch-extensions/blob/d1a36068cf7da4791b59cd72742da5de1811f601/lib/adapters/class-adapter.php#L224-L230)).

### Acceptance Criteria

- Rather than specifying a hardcoded list of fields and weights to search when using phrase matching, derive the fields from the existing query (utilizing what's coming through the plugin/adapter with any filters already applied).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.