[Feature Request] Better search
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 890
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 10
Description
**Is your feature request related to a problem? Please describe.**
The current search implementation for docfx is not ideal, There have been several reports about it not working as expected, such as: #10560 #6614 #2048 #8322
**Describe the solution you'd like**
I suggest 2 things:
1. Switch to [fuse.js](https://www.fusejs.io/), which is also 0 dependency just like `lunr.js`, but uses a tokenized fuzzy search algorithm that works just like people would expect searching to work, and is also very fast. It also supports [unix-like search operators](https://www.fusejs.io/extended-search.html) which is a very useful feature that would solve feature requests such as #1806 (`="Getting Started"` would achieve what that issue is asking for). `fuse.js` is a drop-in replacement, it can be fed the same index that docfx currently generates.
2. Expand `ExtractSearchIndex` to also index methods, properties, enum values, etc.
I have already implemented both of these things in [my docfx setup](https://github.com/sibber5/Sibber.Docfx) and they work great. You can [try the new search here](https://sibber5.github.io/Sibber.Common.Native.Windows/index.html).
I am willing to contribute this if approved.
**Describe alternatives you've considered**
Not relevant.
Contributor guide
Assessment
This issue has not been assessed yet.