gabrielcsapo/docusaurus-plugin-search-local

Enable searching from the middle of the word?

Closed this issue · 3 comments

Reason: For technical terms, people may not remember the full name, but only parts. Searching parts in the middle of a long string does not show result.

Screenshots:

  1. search full term or prefix works:
    https://gabrielcsapo.github.io/docusaurus-plugin-search-local/search/?q=docsRouteBasePath

Screen Shot 2022-04-19 at 2 44 09 PM

  1. Search part term does not show any result:
    https://gabrielcsapo.github.io/docusaurus-plugin-search-local/search/?q=RouteBasePath

Screen Shot 2022-04-19 at 2 44 47 PM

Just for comparison, the algolia search engine seems to support such use case:
https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-pages#mdxPageComponent
Screen Shot 2022-04-19 at 2 48 04 PM

@gabrielcsapo / @lbdm44 Do you know if you're planning to implement this? Would be really beneficial, thanks!

Looking into a fix now @Ancient-Dragon

I created a PR for the fix. will update when we have a published version.