Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add search bar #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kimmcintyre
Copy link
Contributor

Addresses issue #91

Turns on DocFX's search bar for the doc site. Here is an example of searching for DepthStencilState in my local doc site.

image

DocFX's search bar is powered by lunr.js and therefore is subject to the idiosyncrasies of this search engine as described in the lunr docs.

For example, lunr assumes each term in the search query is atomic. So searching for graph and graphic will yield different results.

image

Additionally, lunr assumes a logical OR when searching with multiple terms. Therefore, searching aspect ratio will return the combined results of the two separate search queries for aspect and ratio but not for the specific phrase aspect ratio. This can be partially mitigated by using the search query +aspect +ratio but this will only serve to return documents that have both of these words but not necessarily together in the phrase aspect ratio

So the search functionality that DocFX provides is not perfect, but I do believe that the additional functionality it has over the ToC filter makes it worth enabling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant