alleyinteractive / alleyinteractive/elasticsearch-extensions
Phrase matched searches broken when an Enterprise Search option is disabled
- Vorherrschende Sprache
- PHP
- Sterne
- 5
- Forks
- 0
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Description of the bug
Whenever the Enterprise Search option under "Post Search" >> "Weight results by date" is "Disabled" AND Elasticsearch Extentions' Phrase Matching feature is enabled, the following error occurs. I have not dug into yet, but my guess is that it is attempting to put a function_score clause inside of a bool query.
```
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]",
"line": 1,
"col": 1775
}
],
"type": "parsing_exception",
"reason": "[bool] malformed query, expected [END_OBJECT] but found [FIELD_NAME]",
"line": 1,
"col": 1775
},
"status": 400
}
### Steps To Reproduce
1. Activate plugin on a site with VIP Search (enterprise search)
2. Navigate to /wp-admin/admin.php?page=elasticpress
3. Open the "Post Search" accordion and disable the "Weight results by date" option
4. Enable "phrase matching" via code (hooking into `elasticsearch_extensions_config` and setting phrase matching - e.g. `$es_config->enable_phrase_matching()`
5. Perform a search with a set of double quotes around a word or phrase - e.g. `"category block"`
### Additional Information
This only appears to affect searches that have a set of double quotes around content in the search query.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.