bitwarden / clients

Bitwarden client apps (web, browser extension, desktop, and cli).
https://bitwarden.com
Other
9.01k stars 1.18k forks source link

Search is broken.. #6862

Closed Snacko closed 10 months ago

Snacko commented 10 months ago

Steps To Reproduce

  1. Go to app on desktop pc.
  2. Login and do a search for T-mobile

Expected Result

Only matches to the search are displayed.

Actual Result

results from search, AND everything else in the database is displayed.

Screenshots or Videos

No response

Additional Context

It used to only display what matched my search.

Operating System

Windows

Operating System Version

No response

Installation method

Direct Download (from bitwarden.com)

Build Version

2023.10.1

Issue Tracking Info

bwbug commented 10 months ago

This is expected behavior of the Lunr search engine used by Bitwarden. It treats a hyphen (-) as a space, and does not allow searching for exact phrases. Thus, your search will find every item that contains the letter T as well as every item that contains the word mobile. Items that contain more instances of these terms will be placed higher in the search list.

jtodddd commented 10 months ago

Hi there, bwbug is correct, the Lunr search is causing the behavior you are seeing. If you want to search solely for T-Mobile, you can search the following: >+name:T-Mobile More information on this topic can be found here: https://bitwarden.com/help/searching-vault/#wildcards-and-advanced-search-parameters

We use GitHub issues as a place to track bugs and other development related issues. If your issue persists, please write us back using our contact form, so we can continue troubleshooting: https://bitwarden.com/contact/

You can include a link to this issue in the message content.

Alternatively, you can also search for an answer in our help documentation (https://bitwarden.com/help/) or get help from other Bitwarden users on our community forums (https://community.bitwarden.com/c/support/).

The issue here will be closed.

Thanks!

bwbug commented 10 months ago

@jtodddd For your edification, and to set the record straight, your work-around suggestion is incorrect:

If you want to search solely for T-Mobile, you can search the following: >+name:T-Mobile

The above search will find every entry that contains the letter T in the item name (e.g., T-Rex Racing, Mr. T, or My-T Tas-T Ice Cream). Items that also contain the word "mobile" in any of the searchable fields will be ranked more highly in the search results, but there is no guarantee that the "T-mobile" entry will be at the top of the search results.

This is because Lunr essentially treats the hyphen character (-) like a space character.