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:
{
"filter" : {
"term" : {
"user_id" : "test"
}
},
"suggest" : {
"title_suggester" : {
"text" : "r",
"completion" : {
"field" : "title_suggest"
}
}
}
}
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!
--
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/6589e91d-fcd4-49db-b8c7-317ee800a498%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.