strongbox-password-safe / Strongbox

A KeePass/Password Safe Client for iOS and OS X
https://strongboxsafe.com
GNU Affero General Public License v3.0
1.29k stars 100 forks source link

Enhanced Search (Query Language) #327

Open kumabon opened 4 years ago

kumabon commented 4 years ago

Currently, the search result is universal, as in any records fitting the search criteria.

It would be good to be able to filter results based on Items and/or Tags, by themselves or combination, or even multiple selection.

I have thousands of records grouped under different Items, with different Tags. Searches would often result in an extremely long list of records.

UI-wise, perhaps a "Filter-by" line can be added right below "Title/Username/Password..." buttons, that can be expanded to show available Items and Tags. Selection can be translated into search syntax, similar to "strongbox:auditEntries", such as "items:WebLogins" "tags:abc". Need to consider how to handle space character, and ease of entry.

Perhaps this is related to #225, #193, #228 but not exactly the same. Apologies if it has been mentioned before.

strongbox-mark commented 4 years ago

Yes, not a bad idea, basically just making search more powerful with operators like "tags:" and allowing composition e.g. "strongbox:auditEntries tags:finance".

What does "items:WebLogins" mean in your example, is "WebLogins" a tag?

Possible search operators that come to mind are:

and allow composition with

So a sort of language you might want to save these queries too (or at least save recent searches as part of this).

kumabon commented 4 years ago

Thanks for considering this. For my database, "Web Logins" is a Group/Folder full of website logins. I should have used that term instead of "Items".

While having those search operators are ideal, I trust you would agree its also important to have an interface where casual searches can be done without too much typing.

One more idea is to optionally group the search results by Group/Folder. Perhaps this can be implemented relatively quickly first anyway.

To translate into an actual usage scenario:

I like saved searches and recent searches!

maxmeyer commented 5 months ago

Good day @strongbox-mark, was this functionality implemented - searching for tags?

strongbox-mark commented 5 months ago

Hi @maxmeyer - searching for tags should definitely work for you, what are you seeing?

maxmeyer commented 5 months ago

@strongbox-mark Sure that works, sorry to be not that clear in my question. I meant if this is already implemented:

name:asdf AND tags:finance
comment:asdf AND (tags:finance OR tags:insurance)

My Usecase: I recently moved from using a deep folder structure to a flat one combined with tags.

  1. I have a lot of old entries where the same mail address is mentioned - mostly within the comments
  2. When I look for the login information of that mail account all other entries are found as well
  3. To just find the required entry this would be helpful

      user:user@mailprovider.com AND tags:communication

    or even better would be a substring/regex search

      user:~mailprovider AND tags:communication
strongbox-mark commented 5 months ago

Hi @maxmeyer, no news here.