Trim the Content after applying highlight funciton

Working on Elastic Search 6.5.2. Need to trim the content field to 300 characters after applying highlighting. I don't want to increase the number of fragments. Any suggestions.

{
    "query":{
      "multi_match" : {
      "query":    "test", 
      "fields": [ "title", "content" ] 
   } 
   },
   "highlight":{
      "fields":{
         "title":{
            "pre_tags":[
               "<strong>"
            ],
            "post_tags":[
               "</strong>"
            ],
            "number_of_fragments":0            
         },
         "content":{
            "pre_tags":[
               "<strong>"
            ],
            "post_tags":[
               "</strong>"
            ],
           "number_of_fragments":0           
         }
      }
   }
}```

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