no highlight results for phrase search

cancel
Showing results for 
Search instead for 
Did you mean: 
herbhub
Member II

no highlight results for phrase search

Hi,

I'm trying to return highlight snippets via the search api - which works perfectly fine when searching for words and combining them with AND or OR. But when I search a phrase, the api returns the correct document, but no highlight part in the result. Do you have any pointers to why that is?

Version is 7.2, this query for example works as expected:

{
     "query": {
         "language": "afts",
         "query": "cm:content:this AND cm:content:is AND cm:content:a AND cm:content:test"
     },
     "include": [
         "path"
     ],
     "paging": {
         "maxItems": 10,
         "skipCount": 0
     },
     "highlight": {
         "snippetCount": 3,
         "mergeContiguous": true,
         "fragmentSize": 300,
         "fields": [
             {
                 "field": "cm:content"
             }
         ]
     }
}

 

however, if i change it to

"=cm:content:\"this is a test\""

 no highlights are returned - only the (correct) hit.

thanks