dbt-labs / dbt-docs

Auto-generated data documentation site for dbt projects
Apache License 2.0
141 stars 75 forks source link

[Feature] Search bar should prioritise exact file name matches over fuzzy matches #217

Open thomasaarholt opened 3 years ago

thomasaarholt commented 3 years ago

Describe the bug

Searching for a model e.g. f_my_model often returns results where the model in question is surprisingly far down the list. We often have models with similar names with different underscores, for instance a_users and b_users or f_orders_current and h_orders_old (I have had to make up some names here).

Steps To Reproduce

Open the generated dbt documentation, and search for a model name in the top bar. Type the exact model name (minus extension), and observe that the model is not always the first hit.

Expected behavior

Exact model name should be listed at the top.

Screenshots and log output

I can't provide any screenshots due to it being a private dbt project, but just to provide explicit context, this is the search field I mean: image

The output of dbt --version:


installed version: 0.20.2
   latest version: 0.21.0

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:
  - bigquery: 0.20.2
  - snowflake: 0.20.2
  - redshift: 0.20.2
  - postgres: 0.20.2```

### Additional context
Add any other context about the problem here.
github-actions[bot] commented 2 years ago

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.

rightx2 commented 9 months ago

I think this is really serious problem. ... I don't see why this issue has been closed as completed..

dbeatty10 commented 9 months ago

Agreed that this should not be labeled as "completed" -- thanks for flagging this @rightx2 👍

dbeatty10 commented 9 months ago

Re-categorizing this as a feature request and labeling as "help wanted".

rightx2 commented 9 months ago

Related comment I left on the PR: https://github.com/dbt-labs/dbt-docs/pull/145#issuecomment-1947794357

sercancicek commented 7 months ago

Created a PR for this issue