Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message on has_parent query #35383

Closed
fkelbert opened this issue Nov 8, 2018 · 2 comments
Closed

Misleading error message on has_parent query #35383

fkelbert opened this issue Nov 8, 2018 · 2 comments
Assignees
Labels
>bug :Search/Search Search-related issues that do not fall into other categories

Comments

@fkelbert
Copy link
Contributor

fkelbert commented Nov 8, 2018

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"
    }
  }
}
@jimczi jimczi added >bug :Search/Search Search-related issues that do not fall into other categories labels Nov 8, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

@jimczi jimczi self-assigned this Nov 8, 2018
@jimczi
Copy link
Contributor

jimczi commented Nov 9, 2018

The issue was fixed on master but never backported to 6x. It is backported now so I am closing this issue. Thanks for reporting @fkelbert .

@jimczi jimczi closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories
Projects
None yet
Development

No branches or pull requests

3 participants