Skip to content

Misleading error message on has_parent query #35383

Closed
@fkelbert

Description

@fkelbert

Elasticsearch version 6.4.2

The has_parent query returns misleading error messages, referring to field type rather than field parent_type:

    "type": "illegal_argument_exception",
    "reason": "[has_parent] requires 'type' field"

and

    "type": "parsing_exception",
    "reason": "[has_parent] query does not support [type]",

To reproduce:

POST _search
{
  "query": {
    "has_parent": {
    }
  }
}

and

POST _search
{
  "query": {
    "has_parent": {
      "type": "test"
    }
  }
}

Metadata

Metadata

Assignees

Labels

:Search/SearchSearch-related issues that do not fall into other categories>bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions