Highlight with KNN vector search

Greetings,
I am trying KNN in the search query which is working fine along with that I want to highlight the search term on the top k results fetched from KNN. Is there any way to achieve that?

Hi @Aishwarya

Forgive me for not answering your question but as you are using knn I wanted to take a doubt.
Do you use AWS opensearch?
I ask because Iā€™m trying to know if the Machine Learning API works in the opensearch version of AWS.

I tried GET /_ml/trained_models/ but got this answer.

{"Message":"Your request: '/_ml/trained_models/' is not allowed."}

Hi @rabbitBr ,
Yes I am using OpenSearch, For training your model you can go through these APIs

For KNN support please check the following link: