since the completion suggester is based on an FST that is loaded into
memory and kept up-to-date at index time, it is not possible to filter
What you would need to do in your case is to build a different FST per
city, but whether that's doable or not depends on how many city you have in
your system. What I'm saying is that you pretty much need to know in
advance the possible filters that might be applied and build a proper data
structure at index time.
One other thing that you might want to consider is adding a prefix that
contains the name of the city to your suggestions (input).
Hope this helps
On Thursday, October 17, 2013 1:57:29 AM UTC+2, Johny Lam wrote:
Is it possible to restrict the results returned by the completion
suggester to only the documents where a certain field matches something?
For example, with the hotel index on
http://www.elasticsearch.org/blog/you-complete-me/, is it possible to
only get suggestions for hotels where the city is a specific city?
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 firstname.lastname@example.org.
For more options, visit https://groups.google.com/groups/opt_out.