String json to SearchResponse

Hello.

I used the example below to turn the json response into a SearchResponse and it worked fine.
I made a change in my json file by adding the "suggest" but now I can't parse it correctly.
Does anyone have any tips?

Try

 Map<String, ContextParser<Object, ? extends Suggest>> mapSuggest = new HashMap<>();
    entries.addAll(mapSuggest.entrySet().stream()
        .map(entry -> new NamedXContentRegistry.Entry(Suggest.class, new ParseField(entry.getKey()), entry.getValue()))
        .collect(Collectors.toList()));

but it does not work...

I decided.
you must enter the suggester type, in my case "completion#category_name"

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.