Skip to content

BUG: 400 response to requests when searching comments #3026

Closed
@JakePT

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

  1. Install Debug Bar and Debug Bar ElasticPress.
  2. Activate the Comments and Protected Content features.
  3. Go to Comments.
  4. Perform a search.
  5. Check the Elasticsearch responses is Debug Bar.

Expected behavior
There should not be any errors.

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions