Where can I find the file/function in the code where search is performed?

Let’s use a realistic use-case example for a fictious user:

  • user’s username for most online sites is somethingcrazy or some variation of it like [email protected]
  • user has multiple accounts with the same bank: reallycoolbank.com
    • one account with reallycoolbank.com is for themselves with the somethingcrazy user name
    • other accounts with reallycoolbank.com are for his children which he manages cause his kids are underage
  • as such, the user has multiple items in BW for reallycoolbank.com, each with a different user name
  • user might have a note for reallycoolbank.com, for their own account somethingcrazy, with information like the checking account #
    • the note might be called reallycoolbank somethingcrazy

Now, if the user searches for the term reallycoolbank somethingcrazy they expect to see the relevant items. They do not expect to see:

  • items for reallycoolbank for his kids
  • items for other sites where the login is somethingcrazy

Granted, the above items may be lower on the list but imagine the experience for the average user. They search for reallycoolbank somethingcrazy and see results that don’t logically fit/match. They aren’t going to conclude it’s showing results cause of logical OR. They are going to say the tool/search is broken – because the results are unexpected behavior.

Here is a screenshot of my results. I redacted best I could but labeled everything to get the point across.

  • I searched for {short name of my bank} {login user name}
  • The first 5 results are for other websites with the same {login user name}
  • The 6th result is valid because it has both {short name of my bank} and {login user name}
  • The 7th result is like the first 5
  • The 8th result is a note and is valid because it has both {short name of my bank} and {login user name}
  • The rest of the results are for the same bank but don’t have {login user name} in the notes

And notice the scrollbars. I’ve got hundreds of more results because I use {login user name} on so many sites. Why am I seeing those results when its very obvious I’m looking for results related to my bank? I don’t need to see my Twitter item when searching for my bank.

Now, imagine you’re an average user, you make a search like I did, and get results like that. You’re more than likely to think the search is broken, will get frustrated, and decide not to use the tool.

I love BitWarden because it is OpenSource and you can self-host which makes the inner cybersecurity architect in me happy. UI/UX is my passion. And that is why I am raising this feedback.

I was looking through Luna’s documentation. Even if Luna doesn’t have a way to set default behavior to logical AND, it would be trivial for the code to restructure/reformat the query to include the necessary Luna modifiers.

I just can’t, for the life of me, find where in the code the actual query is passed to the luna object.