Hi,
For the life of me, I can't understand why elastic changed the useful and common use-case of finding autocompletion words and abandoned it for entire document results? Who and why was this decision made? It creates many more problems than it attempts to solve.
Why would I want to auto-complete a document? That makes no sense at all. Before, I can autocomplete words and phrases and pull the document if I needed it.
A user starts typing in a search box and wants to see qualifying words and phrases that begin with their text. I did find a way to do this, but I have to keep a separate document type and mapping to support it. Apparently, I can't complete words in lists of a document and return only those words. I don't want to return all _source and then have to figure it out separately.
Well, I guess this is a feature decision of elastic to not be able to return autocomplete suggestions of document fields and return only those matching fields. instead it returns entire document. To get anywhere close to basic autocomplete, I have to set up completely separate indexes with only the fields I want to autocomplete on as their own documents and then hope these separate indexes stay in sync with my master document index.
I really don't see why elastic can't make this easier.
Document A:
{
"name": .....
"address": ....
"title": ....
}
I want to accept some query string and then ask for any matching fields of documents where they complete the query string. I don't necessarily know in advance which fields those might be and I don't want to construct a query enumerating all the fields. Which could easily change over time in the index.
As a result, I want list of matching fields and doc id's and the value of the matched field. Pretty simple. And a very common use case elastic just does not support easily.
There is no script. The title of the post is a question, which requires a yes or no answer. If you understand the question (see the title of the post) and the problem behind it, then I think you have everything needed to offer some suggestion. There is nothing to reproduce because the post is inquiring about a lack of capability, not a broken existing capability.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.