Hi there, I have integrated TS with a Docusaurus d...
# community-help
i
Hi there, I have integrated TS with a Docusaurus doc site. Everything follows this guide https://typesense.org/docs/guide/docsearch.html#option-a-docusaurus-powered-sites It works, but how can I show highlight of search keyword?
j
Hmm, you should see highlights without any additional configuration.
Could you look at the network requests for search requests made when typing a keyword and post a screenshot of the query parameters sent to Typesense?
Also, may I know which version of Typesense Server you're using?
i
Sure,
Copy code
{
  "searches": [
    {
      "collection": "docs",
      "q": "openapi",
      "query_by": "hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content",
      "include_fields": "hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content,anchor,url,type,id",
      "highlight_full_fields": "hierarchy.lvl0,hierarchy.lvl1,hierarchy.lvl2,hierarchy.lvl3,hierarchy.lvl4,hierarchy.lvl5,hierarchy.lvl6,content",
      "group_by": "url",
      "group_limit": 3,
      "filter_by": "language:=en && docusaurus_tag:=[default,docs-default-1.5.0.dev]"
    }
  ]
}
We are using docker Typesense 0.23.0
j
Hmm, that should work... could you look at the response for that search request and see if there's a highlights key under each hit?
i
Highlight on search UI works but I want to show keyword highlight after user selected doc from search UI
Is that possible?
j
Ahh, that is not possible to do
i
I see, seems like Algolia search on docusaurus.io does not support it too. Thanks @Jason Bosco for the answer 🙂
👍 1
j
Yeah, docusaurus would have to implement something in the core to allow a keyword passed in a query param to be highlighted on a page when rendered. Without that, it's not possible to do this in a cross-browser compatible way from the search plugin