Hi,
I am trying to combine it with the query or a filter with suggester, so
that suggestions are returned only for the hits. Is it possible to
constraint autcomplete (or any suggester for that matter) to work on a
subset of data. E.g. I've got some users with associated documents and I
want to serve them document title suggestions but only for the documents
they can access. I've tried:
and it returns all documents for user "test, and all suggestions for all
users. I was able to hack around it by introducing an extra user_id as a
prefix for every suggestions, but looking for a more principled way.
Thanks!
the completion suggester does not execute a real search query as it uses
different data structures. This also means, that it does not support
filters. There are plans to support something like a context in order to
have a lightweight filter, see
This will allow you suggest only for products in a certain category or for
restaurants around you (as it also has geo support).
Hi,
I am trying to combine it with the query or a filter with suggester, so
that suggestions are returned only for the hits. Is it possible to
constraint autcomplete (or any suggester for that matter) to work on a
subset of data. E.g. I've got some users with associated documents and I
want to serve them document title suggestions but only for the documents
they can access. I've tried:
and it returns all documents for user "test, and all suggestions for all
users. I was able to hack around it by introducing an extra user_id as a
prefix for every suggestions, but looking for a more principled way.
Thanks!
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.