jest中是否有内置解决方案用于向弹性搜索发送completion suggester个请求?
或者我需要为此实现自己的io.searchbox.AbstractAction吗?
答案 0 :(得分:1)
Suggest suggest = new Suggest.Builder("{\n" +
" \"" + suggestionName + "\" : {\n" +
" \"text\" : \"the amsterdma meetpu\",\n" +
" \"term\" : {\n" +
" \"field\" : \"body\"\n" +
" }\n" +
" }\n" +
"}").build();
SuggestResult result = client.execute(suggest);