5

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?

Ian Campbell
  • 23,484
  • 14
  • 36
  • 57
bosskovic
  • 2,034
  • 1
  • 14
  • 29

1 Answers1

2
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);
Navnav
  • 982
  • 3
  • 11
  • 25