-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingelasticsearchRequires understanding ElasticsearchRequires understanding ElasticsearchphpRequires understanding PHPRequires understanding PHPvip-enterprise-searchWordPress VIP Enterprise Search integrationWordPress VIP Enterprise Search integration
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingelasticsearchRequires understanding ElasticsearchRequires understanding ElasticsearchphpRequires understanding PHPRequires understanding PHPvip-enterprise-searchWordPress VIP Enterprise Search integrationWordPress VIP Enterprise Search integration