Search in Custome Fields (bw list items --search example-text)

Hi All,

I try to list an item and set a filter to a custom field (Field name is fqdn).
This seems working fine if I search via the Web Console using the following search expression:
fqdn:bw.example.com

But a search via the bw cli shows an empty result:
bw list items --search fqdn:bw.example.com

Even without the fqdn: prefix shows no result.

Is the bw cli not able to search over all fields including the custom ones?

Cheers, Thomas

@Thomas_A Welcome to the forum!

I am unable to reproduce this. In the Web Vault app (or in the browser extension or Desktop app), I cannot get a search hit on the vault item, unless there is a space character after fqdn (fqdn :bw.example.com) or before the domain name (fqdn: bw.example.com); in these examples, the term that includes the colon character (:) is ignored because no such term appears in the search index. If you’re getting different results, perhaps you can post some screenshots.

FYI, you cannot use a custom field name as a search term prefix (you can only use the nine prefix terms defined in the documentation). Moreover, to search using those field name prefixes, you need to use the advanced search syntax, which requires the search expression to start with a > character.

The correct search expression for what you’re trying to do is:

>+fields:fqdn +fields:bw.example.com

 

The CLI search (bw list items --search) is more rudimentary. Its syntax and capabilities are not well documented, but it does not support advanced searching.

 

What are you trying to do, anyway? Seems odd to use a custom field for the FQDN, instead of using the URI field. Perhaps there is a better solution.