alleyinteractive / alleyinteractive/elasticsearch-extensions

`disable_phrase_matching()` Should Disable Phrase Matching for VIP Search Adapter

未关闭
#78 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
elasticsearch enhancement php
主要语言
PHP
星标
5
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

### Description

I discovered that ElasticPress (and thus VIP Search) uses a "phrase" clause out of the box in its "multi_match" queries. The nature of this phrase match is such that Elasticsearch will apply similar logic to its DSL as what the phrase matching feature provides. In other words, VIP Search has "phrase matching" enabled by default (as part of a multi_match within a "should" clouse). I will create a new issue shortly that would have this feature disabled if the feature is disabled via disable_phrase_matching().

It is worth noting that ElasticPress offers a filter that can be used to reduce the `boost` of the clause mentioned above E.G.
```
add_filter( 'ep_match_phrase_boost', fn() => 0 );

### Use Case

Using VIP Search as a provider, when a user sets `disable_phrase_matching()`, phrase matching should be disabled. That is to say, if the feature is disabled in EX, searching with double quotes should NOT cause exact matching to occur.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。