Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Completion suggester builder for Jest

Is there a built in solution in jest for sending completion suggester requests to elasticsearch?

Do I need to implement my own io.searchbox.AbstractAction for that?

like image 846
bosskovic Avatar asked Nov 01 '22 03:11

bosskovic


1 Answers

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);
like image 99
Navid Avatar answered Nov 15 '22 09:11

Navid