Search by Custom Field NAME

I’d like to be able to do a search that returns records where the NAME of the field matches my search criteria.

For example, I have some identities of a few people and I use custom fields to add extra info, like the number of pets they have titled “no. pets” as a custom field. If I search for “pets” I’d like the results to include all identities with that field.

2 Likes

@link-leo Welcome to the forum!

Unless you are using a mobile app, you can enter the following advanced search expression (please note that the leading > character is required):

>fields:*pets

The search is a little finicky in the way it treats space characters and hyphens, so it is best to use wildcard characters in their place (e.g., *pets as above, or no.*pets).

Note that the above method will try to match either the field name or the field value, so if any of the field values end with pets, those would also come up in the search results.

2 Likes

Thank you for your answer. Unfortunately I am on mobile and even on Desktop I would like to be able to have the field names included in the search by default.

I think the text in the notes are included, it shouldn’t have that much of a performance impact to include the field names.

Is there any reason why this hasn’t been implemented yet? I am a happy supporter of Bitwarden, but that has bugging me for quite a while now and I just don’t understand why it’s not implemented.

Thanks a lot in advance :slightly_smiling_face: !

EDIT Apparently the mobile app doesn’t even look into notes. So perhaps there is a hard technical requirement against including it. It seems it uses Search your Vault | Bitwarden by design ( Search function does not retrieve notes content · Issue #4340 · bitwarden/android · GitHub ).

@Zin Welcome to the forum!

This is already possible in the Desktop app, although it does not automatically append or prepend wildcard characters, so your search expression will have to match a complete word in the field name (unless you include your own wildcards: *searchterm*).

1 Like

Thanks a lot for the warm welcome!

I have 2 questions:

  1. Is there a read regarding the reasons for the search being like it is (especially the basic search on mobile)?
  2. I feel that Search your Vault | Bitwarden is written inconsistently, it states “automatically include leading and trailing wildcards” but then this only seems to be true for name and not the fields listed below “indexed fields” → when I search for foo I’m getting everything with *foo* in the name but I’m getting only foo in the fields → I have to do foo* manually to get foo* in the fields as well.

EDIT I found one for the first question: Search: "and" search terms together instead of "or" - #92 by grb . But it’s pretty old.

EDIT2 Speaking of old: GitHub - olivernn/lunr.js: A bit like Solr, but much smaller and not as bright · GitHub is ancient. That definitely should be revised as it obviously doesn’t make sense to write to the lunr devs when the project is abandoned.

I agree that there is a discrepancy between the actual behavior of the “full text search” and what has been described in the documentation. This has been pointed out in this Github comment, and is the subject of at least two bug reports:

1 Like

Update:

Bitwarden is making some under-the-hood changes to how search is implemented, so it will be interesting to see how the new implementation affects the edge cases discussed above: