Typeahead/Completion With Has_Child


I'm trying to create a typeahead where people get autocomplete using text
from a child but returning a parent.

The idea is that all the variations of parent are stored in child
documents, but when a user searches we only show the parent.

I have it working at the moment using a has_child search but wanted to know
if there was a way to use the completion suggester & has_child
for a better user experience.

for example:

parent: "New York:

child: "New York City"
child: "Buffalo"

someone types "buff"
they get "New York" returned.

Does that make sense???

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6f192fcb-b03e-4cee-adc2-b78c93da2131%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.