it's a simple question, but I can't seem to serialize the SearchResponse back to a json string.
What I've tried:
final SearchResponse<ObjectNode> search1 = client.search(
e -> e.index("myindex")
.query(
qb -> qb.matchAll(ma -> ma)
)
,
ObjectNode.class);
final JsonGenerator generator = Json.createGenerator(response.getWriter());
search1.serialize(generator, new JacksonJsonpMapper(createDefaultObjectMapper()));
generator.close();
I get the non meaningful error:
java.lang.IllegalArgumentException: Jackson's ObjectMapper can only be used with the JacksonJsonpProvider