gabrielcsapo/docusaurus-plugin-search-local

Allow solo indexes to be created per path

Opened this issue · 1 comments

We have a documentation project with multiple "books". E.g. android, ios, web, etc.
Books may have similar titles and headings. If a user is in the android documentation, we don't want to show them ios results.

If the user is viewing a page with the /android path, there should be an option to show only results from the /android path, ignoring all other search results.

Similarly, If the user is viewing a page with the /ios path, there should be an option to show only results from the /ios path, ignoring all other search results.

And so on...

This could probably be achieved with an option called showResultsByBasePath, and have paths be explicitly specified (easier to implement) or implicitly determined (harder to implement I think).

I think the option makes sense to add, it would be nice to have this turned on by default. Rank results by base page higher than the rest and then show the user results outside of the context they are in as a separate section.