griffithlab / civic-client

Web client for CIViC: Clinical Interpretations of Variants in Cancer
MIT License
50 stars 28 forks source link

Simple spell corrector in help doc search #1549

Open lsheta opened 3 years ago

lsheta commented 3 years ago

I think the current search bar looks for matches containing the exact string searched for (ex: docs for "Organizations" will show up if I search "Organization" but not if I search "Organzation" or "Organizationss"). Is this a complex problem to solve? Obviously not urgent or anything. Just an idea that might improve usability of the docs.

susannasiebert commented 3 years ago

Read the docs supports a fuzzy search syntax. This requires the users to type their search in in the format search_term~N where N is a number indicating how close to the search term the match is allowed to be, e.g. searching organizationss~2 returns results for organizations (https://civic.readthedocs.io/en/latest/search.html?q=organizationss%7E2&check_keywords=yes&area=default#). However, I haven't found a way to make this the default behavior of the search without the user having to enter this special syntax.

More info on the supported search syntaxes can be found here.

lsheta commented 3 years ago

Thanks for the additional information. I didn't know that fuzzy searches were supported.