Search Language

From JRiverWiki
Revision as of 23:11, 24 August 2010 by MrC (talk | contribs) (Move modifers into separate table; clarify some items, clean and start addition of descriptions)

Jump to: navigation, search

This section describes the various rules and modifiers available in the Search bar, in the Build New Smartlist dialog box, and in View Scheme creation.

The Keywords and Modifiers are listed in alphabetical order. Not included are any custom fields you may have created, nor any expressions. For functions and expressions, see Media Center expression language.

Search terms or abbreviations (listed below), can be typed directly as text in the Search bar, bypassing the Search Wizard.


Keywords create selections.

Keywords also have abbreviations, which are customizable. To go Tools > Options > Library, select the field and press Edit. Type the abbreviation you would like to use in the Keywords box. Multiple keywords may be used, each separated by a semi-colon (no spaces).

Name Keywords/Abbrev Example
Access Rating accessrating [Access Rating]=PG-13
Album album= or al= al=[Highway 61" finds all albums that being with Highway 61
Album Artist albumartist= albumartist=Various
Album Artist (auto) autoalbumartist= autoalbumartist=Various This will return all album artist fields manually entered

autoalbumartist=multiple This returns all multiple artists if it’s a mix cd (determined automatically).

Album Gain albumgain= or ag= ag=<2
Album Type albumtype= [Album Type]=[Single artist (complete)]
Artist artist= or ar= ar="Bob Dylan" finds the exact phrase
Artist – Album (Year) n/a [Artist – Album (year)]=[Lilac Time – And Love for All (1990)]
Band band= or bd= bd=Lilac Time
Bit Depth n/a [Bit Depth]=<16
Bitrate bitrate= bitrate=198
Bookmark n/a
BPM (beats per min) bpm= bpm=130

bpm=<130 (smaller than 130)

Channels n/a
Comment comment= or c= comment="live at the Horseshoe"
Complete Album completealbum= completealbum==0 returns incomplete albums and completealbum==1 returns complete albums.

note: a complete album has sequentially numbered tracks, from 1 to n.

Composer composer= composer=mozart
Compression n/a
Content Distributor cdistrib=
Content ID cid=
Content Type ctype=
Date date-=, d= date=<1y (less than 1 year ago)

date=>3m (more than 3 months ago)
You can use y (year), d (days) h (hours) m (minute) or s (seconds).

Date (day) n/a [Date (day)]=31
Date (filename friendly) n/a [Date (filename friendly)]=[20040521-174844]
Date (month) n/a [Date (month)]=May
Date (year) year= year=1973 or year==0 (for 0 without returning 2000)
Date Created n/a [Date created]=<1d (today), or [Date Created]=<30m (less than 30 minutes ago). You can use y (year), d (days) h (hours) m (minute) or s (seconds).
Date Imported dateimported= dateimported=<=6d (last 6 days)

dateimported=30h-60h (imported between 30 and 60 hours ago)
dateimported=<1y (within the last year.
You can use y (year), d (days) h (hours) m (minute) or s (seconds).

Date Modified n/a [Date Modified]=<30m (less than 30 minutes). You can use y (year), d (days) h (hours) m (minute) or s (seconds).
Dimensions n/a
Disc # n/a
Duration length= or duration= duration=300 nb-duration is in seconds

length=>300 returns all files with a duration greater than 300 seconds

Events events=
File Size size= size=>7000 (size is in kbs)
File Type Filetype= Filetype=mp3
Filename filename= or location= location=D:\Music\Various\
Filename (name) [Filename (name)]="Train to Prague"

Use quotes if there are spaces or special characters in the name

Filename (path) [Filename (path)]=photo

[Filename (path)]="C:\My Music"
Use quotes if there are spaces or special characters in the name

Genre genre= or g= g=rock
Height height= height=>100
Image File imagefile= imagefile=adams returns all images containing the word adams in its name. imagefile=[ ] returns files that have no images.
Insensity intensity= intensity=3 or intensity=>2 (values from 1 to 5)
Keywords keyword= or keywords= or kw= kw =poprock;1979;hits (values: semicolon delimited list)
Last Played lastplayed= lastplayed=<24h (less than 24 hours)

lastplayed=<30m (less than 30 minutes)
You can use y (year), d (days) h (hours) m (minute) or s (seconds).

Lyrics lyrics= lyrics="you know your problem"
Media Type mediatype= mediatype=image
Mix Album mixalbum=
Name (Title) name= or title= or n= name="Tangled up in blue"
Notes notes= notes=”conducted by Jeremy”
Number of Plays numberplays= numberplays=>10 returns all files played more than 10 times
or or Extends the search: "Bob Dylan" or "Judy Collins"
Peak Level peaklevel= peaklevel=.77
People people= people=mom,dad,Mike displays all photos that are of one of these people
Places places= places=Amsterdam,London,cottage
Playback Range playbackrange=
Playlist playlist= or p= p="top 40 1996"
Rating rating= or r= rating=3, or rating=5,4
Removable removable= Returns info on files that are on removable media, like a CD or DVD. This new command replaces [Filename}=[Ox” from Media Jukebox.
Replay Gain replaygain= or rg= rg= -16
Sample Rate n/a
Service: Album Price n/a
Service: Track Price n/a
Text n/a

[Text]=”lemongrass chicken”

Track # tracknumber= or t= t=4 returns all track numbers with 4 (4, 14, 24)

t==4 returns only tracks which equal 4.

Volume Name volume= volume="Music 29" (insert name of your CD) (see Note 1)
Width width= width=>80
Year – Album

Note 1: This field is best used in conjunction with the ~d parameter, which specifies the database in which to search. Normally, the volume parameter will be relevant in the CD database. See ~d in the Modifiers below.


Modifiers alter the current selection of items.

Name Modifier Description / Examples
Database Location ~d Selects the MC database(s) used for queries (eg. main, cd, temporary, etc.)

rock ~d=c searches CD database only for ‘rock’.
rock ~d=mt searches main and temporary databases.
rock ~d=mct searches main, CD and temporary databases.

Duplicates ~dup= or ~nodup= Includes or excludes duplicates from the current selection.

~dup=[name],[artist] only keeps files in a list when at least one other file has the same name and artist in the list. You can add as many fields as you like (e.g., duration, album, etc).
~nodup=[name],[artist] keeps one copy of files that have duplicates.

Fill ~fill Selects and limits the number of items to fill the specific media type to maximum capacity. This modifier limits the number of files returned based on the amount of empty space left on the default or specified device.

~fill or ~fill=[My ipod name] or ~fill=[D:\] How do you specificy a CD drive? Just the drive name?

Full Albums ~a Expands the track selection to include all tracks from the selected albums.

Include all tracks from the currently selected albums.
~a desolation row
Returns all tracks from each album for which “desolation row” is a track. If the track is on three albums, then all tracks from all three albums are returned.

Limit ~limit Limits the current selection set to a maximum number of matched keys, and maximum tracks (Q: ?tracks only?) per key. Usage: ~limit=<total key limit>,<per key limit>,<key fields>
Use -1 to indicate all.

[genre]=[rock] ~limit=-1,2,[artist]
All rock, all artists, and of those artists, play no more than 2 songs by any artist:

Limit to n tracks ~n ~n=10 returns 10 random tracks.

~n=10 Bob Dylan returns 10 tracks containing the words Bob and Dylan.

Mix ~mix Creates mixes from the current selection of a specified size (either a number or percentage).

g=rock ~mix=100,50%,{[Rating]=>3},50%,{[Rating]=<1}
play a mix of rock songs, ½ rated 4,5, and ½ unrated.

Limit (by megabytes) ~s Limit by total track size

~s=650 returns a random number of tracks totaling a maximum of 650MB.
~s=650 Bob Dylan returns 650MB worth of tracks with Bob and Dylan in any of the fields.

Sort ~sort Sorts the selection by the specified key(s).

~sort=[Year],[track #] ~sort=[Random]

Limit by total track time ~t Limit the number of minutes of total track time to the specified number of minutes. (Q: Random?)

~t=60 returns 60 minutes of random music.

Limit by percent ~% Limits by percentage of selection.

~%=50 "Bob Dylan"
Returns 50% of all tracks with Bob Dylan in any field.

Note: The equal sign ("=") between the ~n, ~d or ~t and the value is optional (e.g., ~n30 and ~n=30 are equivalent).

(Q: when are random items returned?)

Quoting, Grouping, Delimiters and Operators

( TBD: clarify this section; perhaps more should be merged with Modifiers above? )

Explanation Example
" " exact match & multi-word search "Bob Dylan" "Desolation Row"
( ) exact match & multi-word search "Bob Dylan" (1966 or 2001)

returns an exact match on Bob Dylan, AND an exact match on 1966 and another on 2001. ( ) are used as in a math equation. Example: r=4,5 (genre=rock or year=1970-1980) is much different from r=4,5 genre=rock or year=1970-1980.

[ " exact beginning

(don't forget the " at the end of entry)


returns everything beginning with "Stan". Stan Getz, Stand by Me, Standing in the Doorway

" ] exact ending

(don't forget the " at beginning of entry)


returns everything that ends with "stand". Stand, I Will Stand, I Didn't Understand.

[ ] begins & ends exactly as indicated [Bob Dylan], [Desolation Row]

The results will exclude Bob Dylan & the Band because this entry does not end with Dylan.

, comma, delimits lists artist="Bob Dylan",[Sting],Merlin

This returns all tracks from these three artists. Do not insert spaces.

- exclude search term "Bob Dylan" -album=([time",[blood","mercy]) –year=1993

returns an exact match on Bob Dylan, except for albums beginning with "Time" and "Blood", ending with mercy, and excluding tracks from 1993.

and narrow the search "Bob Dylan" and "the Band"

Note: the "and" is assumed whenever you type in many words, so it is not necessary to include it.

or extend the search "Bob Dylan" or "Judy Collins"
< smaller than lastplayed=<60 returns tracks played in less than the past 60 minutes.
> greater than bitrate=>128 returns tracks with more than 128 bitrate, or

rating=>3 returns all tracks rated with 4 or 5.

Note: Quotation marks and brackets must go in pairs. For example, Metallica] is invalid; it must be either [Metallica] or "Metallica] ).

Note: When you have an = followed by a numeric value, the search looks for a substring, and so will return all items containing that number. Eg year=0 will return 0, 2000, 2001, 1990. If you want to search for an exact number, use two equal signs: year==0 which will return only those tracks with a year of 0.


Here are few examples of the kinds of rules you can create. Note: these examples are for typing the rules directly; you can use the Wizard for much simpler access to rules.

genre, bitrate, comment

[genre]=[opera] [bitrate]=[320] [comment]="Italian"
Result: Finds all opera files with a bitrate of 320 that include "Italian" in the comment field

duration, last played

[lastplayed]=<60m [duration]==>300
Result: Finds all tracks that are 5 minutes long or more (300 seconds), and that have played in the last hour (60 minutes)

image file

Find all files whose image field is empty (files without images). Placing a minus sign – immediately before Imagefile finds all files that do have imges.
Finds all tracks with external cover art. Adding – before this expression returns all tracks with cover art stored internally (in the file).

playlist, last played, limit tracks

[playlist]="top 40 1983" [lastplayed]=10-30 ~n=10
Result: Finds 10 tracks tracks that are in the "Top 40 1983" playlist that were last played 10-30 minutes ago.

file size, artist

[size]=>7000 [artist]=[Bet*
Result: Find all files larger than 7000kbs (or 7MB) whose artist field begins with "Bet"

exclude, number of plays

[genre]=[alt* numberplays=>10 -[artist]=Sting,Beatles
Result: Find all genres that begin with "alt", and play all the tracks that have been played more than 10 times, but exclude tracks from Sting and from the Beatles. (Note: To manually type in an exclusion, as in this example, simply put a "-" before the rule.)

sort, rating, limit time

~sort=[Random] [Rating]=>=3 ~t=60
Result: Find 60 minutes worth of files rated 3 or higher and sort them randomly.

date imported

Result: Show all files imported in the past 7 days. Note: You can use y (year), d (days) h (hours) m (minute) or s (seconds).


g=rock ~mix=100,50%,{[Rating]=>3},25%,{[Rating]=1,2},25%,{[Rating]=[]}
Result: play 100 rock tracks, 50% of which are rated 4 and 5, 25% of which are rated 1 and 2 and 25% unrated.
~mix=50,50%,{[Genre]=[Country Rock]},50%,{[Genre]=[Alternative Rock]}
Result: play 50 tracks, ½ of which are Country Rock, and ½ of which are Alternative Rock.


[genre]=[rock] ~limit=7,-1,[album]
Result: play only 7 rock albums.
Explanation: for all rock, find only 7 albums, and play all (-1) tracks from that album.
The syntax for use with ~limit is:
This means: take a key field (e.g., album), limit the total of that field (7 albums, or –1 for unlimited), and of that total, limit again per field (2 tracks per album, or –1 for unlimited).
~limit=-1,1,[Artist] ~limit=-1,2,[Decade]
Result: plays 10 tracks, 2 from each of the decades (a custom field) and the same artist appears only once.
Explanation: The first limit: find unlimited artists (-1), and play only one track per artist (1). The second part means: find all decades (-1) and limit to 2 tracks per decade (2).
[genre]=[rock] ~limit=7,2,[album]
Result: From the rock genre, find 7 albums, and play only 2 tracks per album.
Explanation: for all rock, limit the total albums to 7, and limit those 7 albums to 2 tracks each.

Note: The length field is calculated in seconds. The lastplayed field is calculated in minutes: <20 means smaller than, or within the last 20 minutes, whereas >20 means greater than, thus before the last 20 minutes. Using 10-30 means between 10 and 30 minutes.