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

Implement fuzzier search for model names in docs #143

Closed
joellabes opened this issue Oct 8, 2020 · 2 comments · Fixed by #145
Closed

Implement fuzzier search for model names in docs #143

joellabes opened this issue Oct 8, 2020 · 2 comments · Fixed by #145
Labels
enhancement New feature or request

Comments

@joellabes
Copy link
Contributor

Describe the feature

Searching for model names should exclude underscores and other word break characters, and be able to find tokens in any order.

Who will this benefit?

We (like probably everyone else) use snake_case in our model names. When looking for a model in dbt Docs, I try to search by a couple of keywords (e.g. "class teachers") if I know a model exists but don't remember its exact name. This doesn't find a model called teachers__class_counts, because the search appears to require a perfect substring match, such as _class_c.
image

Even if I remember the model name, having to remember where the underscores go is a pain - is it user_meta_data or user_metadata?

Describe alternatives you've considered

  • Having a better memory
  • Searching for a single word using the dbt search bar, then searching for a second word using Ctrl-F, e.g.
    image

Additional context

If separator characters are included in the search then they shouldn't be stripped. Perfect substring matches should probably still win, but I haven't put a lot of thought into those edge cases.

Are you interested in contributing this feature?

My JS is pretty much limited to hello world, but if you point me in the right direction I'm happy to lose an hour or two trying before giving up.

@jtcohen6
Copy link
Contributor

jtcohen6 commented Oct 8, 2020

Completely on board with this, @joellabes. I'm going to transfer this issue to the dbt-docs repo.

If you want to give this a go, I think search.js is the right place to start looking.

@github-actions
Copy link
Contributor

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants