How to get hits fragment array in FTS node js response?

What is setting I have to do to get hits array ?
Above is the sample example .
Below is my query resquest,

I am getting empty in hits [ ]

Tagging @brett19, looks like more of an SDK related query.

Cheers,
Sreekanth

If I do request using postman I am getting the below response ,

image

But using node js application I am getting empty hits[ ] array.
I want same response what I am getting with postman.

Below is my code snippets,

const couchbase = require(‘couchbase’);

const SearchQuery = couchbase.SearchQuery;
const SearchFacet = couchbase.SearchFacet;

var cluster = new couchbase.Cluster(‘couchbase://localhost’);
cluster.authenticate(‘userName’, ‘Password’)
const bucket = cluster.openBucket(“beer-sample”);

var tq1 = SearchQuery.term(“coffee”).field(“description”);
var query = SearchQuery.new(“beer-search”, tq1);
query.addFacet(“categories”, SearchFacet.term(“category”, 5));
query.limit(3);

bucket.query(query, (error, result, meta) => {
console.log(result)
console.log(meta)
});

Do I am missing anything ?

After long research I found ,
we need to override existing highlight property.
query.data.highlight = { };

then you will get fragment array,

“fragments”: {
“pageContentText”: [
“Today and Tomorrow is Holiday,got it. اليوم,عطلة”
]
}