Regex query across all fields


#1

Trying to weed out tracks with acousticbrainz values stored as strings as per this issue:


I’m having trouble getting the query right to search all fields:

beet list -f 'path' ":^[0-9]\.[0-9]+e-[0-9]{2}"

produces no results, but:

beet list -f 'path' "mood_aggressive::^[0-9]\.[0-9]+e-[0-9]{2}"

will show tracks with these string values for mood_aggressive (or any single specified field). Am I doing something wrong?


#2

Using a single leading : will search across all the default fields (i.e., the same set of fields as a plain, non-prefixed query). For example:

$ beet ls ':99[\d\s]'
Crystal Castles - Crystal Castles - 1991
DJ Danger Mouse - The Grey Album - 99 Problems

We don’t currently have a way to express a query that searches across all fields, including those flexible attributes defined by a plugin. That could be an interesting addition, though!


#3

I knew there was something I musn’t have been understanding. It’d be great if that could be incorporated in a future release.