ElasticSearch 5 adding context to SuggestionBuilders
问题 I am working on ES5 through java, and am trying to add context to a CompletionSuggestionBuilder. I have a map of String objects that need to be added. The code I have so far is - Map<String, String> context = ... CompletionSuggestionBuilder csb = SuggestBuilders.completionSuggestion(field).text(value).size(count); How do I add context objects to csb ? I think the method to use is - csb.contexts(Map<String, List<? extends ToXContent>> queryContexts) But I don't know how to get from my map to