Skip to content

Example in documentation for _parent fails  #17935

Closed
@fsparv

Description

@fsparv

Elasticsearch version:2.3.1

JVM version:
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

OS version:
Linux customerhostname 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Description of the problem including expected versus actual behavior: Following the documentation on https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-parent-field.html I get a 400 error in sense for the second PUT, following it in FireFox RestClient (using POST not GET as per https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html), I get no results for the final has_child query.

Steps to reproduce:

  1. Install elastic, single node, default everything
  2. Apply mapping and add data as shown on https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-parent-field.html
  3. Issue query shown at https://www.elastic.co/guide/en/elasticsearch/reference/2.3/mapping-parent-field.html

Expected result: One my_parent document should be returned (even if further parent docs are added)...

Actual result: No documents are ever returned by any "has_child" query, including a match all query such as:

POST my_index/my_parent/_search?routing=_id
{
  "query": {
    "has_child": { 
      "type": "my_child",
      "query": { "match_all": {} }
    }
  }
}

Running queries with a GET line in Sense (after posting the docs with RestClient due to aforementioned 400 error) also does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions