Highlight in template query elastic


(Narmatha) #1

In the below query i am trying to use the highlight option in the template query but its not working ?

PUT /_search/template/my_template
{
"template": {
"bool": {
"should": [{
"wildcard": {
"articleText.textContent": {
"value": "{{param1}}"
}
}
},
{
"wildcard": {
"articleText.textContent": {
"value": "{{param2}}"
}
}
},
{
"wildcard": {
"articleText.textContent": {
"value": "{{param3}}"
}
}
}
],
"minimum_should_match":1

  },

"highlight": {
"fields": {
"articleText.textContent": {
"fragment_size" : 500
}
}
}
}
}

How to achieve this ?


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.