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).