BUG: 400 response to requests when searching comments #3026
Closed
Description
Describe the bug
When searching comments in the admin with the Comments and Protected Content features added Debug Bar was showing a total of 4 requests, and 2 of those were returning a 400 error response with the following content:
{
"error": {
"root_cause": [
{
"type": "parsing_exception",
"reason": "[term] query does not support [post]",
"line": 1,
"col": 642
}
],
"type": "x_content_parse_exception",
"reason": "[1:642] [bool] failed to parse field [must]",
"caused_by": {
"type": "x_content_parse_exception",
"reason": "[1:642] [bool] failed to parse field [must]",
"caused_by": {
"type": "parsing_exception",
"reason": "[term] query does not support [post]",
"line": 1,
"col": 642
}
}
},
"status": 400
}
Apart from these errors in Debug Bar the actual search appeared to function as expected, so these responses appear to be for some secondary queries.
Steps to Reproduce
- Install Debug Bar and Debug Bar ElasticPress.
- Activate the Comments and Protected Content features.
- Go to Comments.
- Perform a search.
- Check the Elasticsearch responses is Debug Bar.
Expected behavior
There should not be any errors.