I have indexed some of my person objects. Now i want to implement an autocompletion function in my search, so the user start typing "Da" which triggers a search and my Searchhits contains the String "Daniel", "Daniela" and "Darius" for example. There is a Suggestion API which can be used separately but also within searches, what should i use? I already have a solution but, this returns me all person objects, not only the Strings, so how can i know that the firstname or lastname matched???
Please post a JAVA example, not a Rest example because i use the java Api.
Thanks for any help, elasticsearch really drives me crazy...