>From autocompleter, usually you return the matched word, the output. Is there any way to return exactly what you matched on?
For example if you look at the completion info here<http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-suggesters-completion.html> you'll see the input for a doc is a list [ "Nevermind", "Nirvana" ] . But how do we know if we complete on 'Nevermind' or 'Nirvana'? Arguably you can say if the input is 'Ne' assume Nevermind, and similarly for 'Ni' for Nirvana, but what about when these inputs get more complex? You want to know the exact input completed on, so you can say to the user 'Your input matches xxx', but its 'xxx' My main reason for asking is I have created a company index, and well there are mergers. For example someone may type Merrill Lynch to get back Bank of America as their output. So when they type 'Merr' to get 'Bank of America', it lacks consistency for the user. I'd like to improve upon this, so I can say ''Merrill Lynch', did you mean 'Bank of America'?' A long winded way of doing this would be to then look up the document in the index, and determine which input was used... but this is extremely long winded. Also secondly you could place every variant in a separate document, so input is just a string. But this means you'd quite possibly have multiple docs being returned with the same name, to show up multiple times in the response (not ideal). Any ideas on how to do this? or if the functionality is there? -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0d866dcd-ba1e-4b56-b76b-9a01d891a759%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
