(Re-posting this as it was automatically closed due to lack of replies)
Hi guys
I'm trying to use the CompletionSuggestionBuilder (context suggester) with the Java client (ES 5.0.1), and I'm struggling with adding contexts, and the API is not entirely clear on that.
This is as far as I got, but again, only by intuitively surfing the API, not really sure if this is the right way to go about it, as documentation is scarce in this area.
CompletionSuggestionBuilder completion = new CompletionSuggestionBuilder(FIELD_SUGGEST)
.prefix(text);
Map<String, List<? extends ToXContent>> contexts = new HashMap<>();
???
completion.contexts(contexts);
Also, methods on CompletionSuggestionBuilder.Contexts2x seem to be all deprecated, which I presume is not the route to pursue.
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.