# Completion Suggester on nested property returns nested object only

**URL:** <https://discuss.elastic.co/t/completion-suggester-on-nested-property-returns-nested-object-only/127706>\
**Category:** Elasticsearch\
**Created:** [April 11, 2018, 11:33pm UTC](https://discuss.elastic.co/t/completion-suggester-on-nested-property-returns-nested-object-only/127706 "2018-04-11T23:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dankellett](https://avatars.discourse-cdn.com/v4/letter/d/848f3c/32.png) [@dankellett](https://discuss.elastic.co/u/dankellett)\
**Post date:** [April 11, 2018, 11:33pm UTC](https://discuss.elastic.co/t/completion-suggester-on-nested-property-returns-nested-object-only/127706/1 "2018-04-11T23:33:22Z")

</div>

I'm having some trouble getting the completion suggester to return the parent object when using a nested suggestion field.

The following query will return a set of nestedField1 objects, which is a nested field. I would like to return the full document in the results. Is this possible?

```
POST myIndex/_search
{
  "suggest": {
    "productSuggestion": {
      "prefix":"a",
      "completion": {
        "field": "nestedField1.productName.suggestion",
        "size": 5
      }
    }
  }
}

```

ES Version: 6.2.2

It also turns out when trying to use the NEST sdk, it attempts to map this child object to the parent object and obviously returns empty values because of the impedance mismatch. Seems like there is a bug in what is returned by the ES db or the NEST sdk (or pebkac).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 9, 2018, 11:33pm UTC](https://discuss.elastic.co/t/completion-suggester-on-nested-property-returns-nested-object-only/127706/2 "2018-05-09T23:33:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
