I have a document that have some tags for instance.
{name: 'foo', tags: ['black', 'green', 'yellow', 'saturday night
fever']}
The tags are not known, a user can insert anything.
I want to provide autocompletion so users can reuse tags already used
by others. To do so I do a prefix query.
I would love if the query could also return the original term that
matched the query. In the example above, if I search for 'satur' I
would like to get 'saturday night fever' tag instead of the whole
document.
There isn't a way to do it, unless you create an autocomplete index with
tags as documents, or maybe do the matching yourself on the client side (if
its a prefix based one, its simple).
I have a document that have some tags for instance.
{name: 'foo', tags: ['black', 'green', 'yellow', 'saturday night
fever']}
The tags are not known, a user can insert anything.
I want to provide autocompletion so users can reuse tags already used
by others. To do so I do a prefix query.
I would love if the query could also return the original term that
matched the query. In the example above, if I search for 'satur' I
would like to get 'saturday night fever' tag instead of the whole
document.
There isn't a way to do it, unless you create an autocomplete index with
tags as documents, or maybe do the matching yourself on the client side (if
its a prefix based one, its simple).
I have a document that have some tags for instance.
{name: 'foo', tags: ['black', 'green', 'yellow', 'saturday night
fever']}
The tags are not known, a user can insert anything.
I want to provide autocompletion so users can reuse tags already used
by others. To do so I do a prefix query.
I would love if the query could also return the original term that
matched the query. In the example above, if I search for 'satur' I
would like to get 'saturday night fever' tag instead of the whole
document.
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.