new_in_town
08/09/2024, 1:11 PM{
"name": "content_ind",
"type": "string",
"index": true,
"stem": true
},
{
"name": "content",
"type": "string",
"index": false,
"store": true
}
content_ind
- *ind*exed content, NO HTML.
content
- content "as is", WITH HTML
Now I search in content_ind
and display to user content
. It works:
typesense.collections('test').documents().search({
'q': searchTerm,
...
'query_by': 'title, content_ind, tagsNames1, tagsNames2',
'exclude_fields': 'content_ind'
})
Now how to do highlighting?
P.S. I think this documentation chapter
https://typesense.org/docs/guide/tips-for-searching-common-types-of-data.html#html-content
could be extended: would be great to read about highlighting for HTML Content.Fanis Tharropoulos
08/09/2024, 4:25 PMnew_in_town
08/09/2024, 5:11 PM