Я разрабатываю следующий фрагмент кода:
app.get('/search', function (req, res){
let body = {
size: 200,
from: 0,
highlight: {
pre_tags : ["<tag1>"],
post_tags : ["</tag1>"],
fields: {
"_content" : {}
}
}
}
client.search({index:'juridico', q: req.query['q'], body: body})
.then(results => {
console.log(results);
res.send(results.hits.hits);
})
.catch(err=>{
console.log(err)
res.send([]);
});
})
Но когда я передаю параметр highlight для тела, я не получаю его в ответ.