AppSync did't return Highlight response with opensearch resolver

0

Hi have the following schema, example:

type Demo { id: ID! code: String name: String title: String highlight: String }

and my query resolver template looks like this,

{ "version":"2017-02-28", "operation":"GET", "path":"/index/_search", "params":{ "headers":{}, "queryString":{}, "body":{ "query": { "bool": { "filter": { "term": { "code": $util.toJson($context.arguments.code) } }, "must": [ { "bool": { "should": [ { "match_phrase_prefix": { "title": { "query": $util.toJson($context.arguments.title) } } }, { "match_phrase_prefix": { "name": { "query": $util.toJson($context.arguments.name) } } } ] } } ] } }, "highlight": { "fields": { "name": {} } } } } }

all results are getting fine except highlight Does anyone have any idea about this? I want to get highlighting responses in the same query.

No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas