#community-help

Segmenting Search Results in Docusaurus Packages

TLDR Dennis sought a way to segment Docusaurus search results by package. Jason suggested forking the docsearch UI to allow for this.

Powered by Struct AI

1

1

4
3mo
Solved
Join the chat
Aug 10, 2023 (3 months ago)
Dennis
Photo of md5-f08f347efebf28391f88e46f8b5539a6
Dennis
11:56 AM
Hi everyone! I am building a docusaurus page for a project.
I have two packages and created a documentation (on the same docusaurus instance) for each package.
Let's say package-core and package-client.
I use the docsearch scraper to index all of the documentation.
If I use the TypeSense Docusaurus search plugin the search works as expected.
But there is no way to tell if the search result belongs to package-core or package-client, it is always listed under "Documentation".
Is there a way to split the search results like this:

package core
--- result one
--- result two

package client
--- result one for client
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
03:33 PM
I don’t think the docsearch UI allows you to do this natively. So you would have to fork it and make the changes needed to segment results like that using multi-search
03:33
Jason
03:33 PM

1

Aug 14, 2023 (3 months ago)
Dennis
Photo of md5-f08f347efebf28391f88e46f8b5539a6
Dennis
08:34 AM
thank you!

1