alleyinteractive / alleyinteractive/elasticsearch-extensions
`disable_phrase_matching()` Should Disable Phrase Matching for VIP Search Adapter
- Dominant language
- PHP
- Stars
- 5
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### 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.
Contributor guide
Assessment
This issue has not been assessed yet.