Difference between revisions of "Search Language"

From JRiverWiki
Jump to: navigation, search
Line 3: Line 3:
 
If you already know the exact search term or abbreviation (see the list below), you can type those in without having to use the Search Wizard.
 
If you already know the exact search term or abbreviation (see the list below), you can type those in without having to use the Search Wizard.
  
The following is a list of all Rules, Modifiers and Keywords in alphabetical order.  This does not include any custom fields you may have created, nor does it include any expressions (these are listed at the [http://www.jrmediacenter.com/devzone.html J River Developer Webpage]).
+
The following is a list of all Rules, Modifiers and Keywords in alphabetical order.  This does not include any custom fields you may have created, nor does it include any expressions (these are listed at the [[DevZone]]).
  
 
Items in '''bold''' are modifiers, rather than database fields.
 
Items in '''bold''' are modifiers, rather than database fields.
Line 349: Line 349:
 
==Special Modifiers, Functions and Expressions==
 
==Special Modifiers, Functions and Expressions==
  
For functions and expressions, see http://www.jrmediacenter.com/DevZone/DBExpressions.htm
+
For functions and expressions, see [[Media Center expression language]].
 
{| border="1"
 
{| border="1"
 
|-valign="top"  
 
|-valign="top"  

Revision as of 09:15, 26 January 2007

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.

If you already know the exact search term or abbreviation (see the list below), you can type those in without having to use the Search Wizard.

The following is a list of all Rules, Modifiers and Keywords in alphabetical order. This does not include any custom fields you may have created, nor does it include any expressions (these are listed at the DevZone).

Items in bold are modifiers, rather than database fields.

Note: the list of abbreviations that can be used for a rule is displayed in Tools > Options > Library. Select a library field and then select Edit. The abbreviation is listed in the Keywords field.

Name Keywords/Abbrev(1) 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=
Database Location ~d 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.

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
Duplicates ~dup= or ~nodup= ~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.

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

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

This modifier limits the number of files returned based on the amount of empty space left on the default or specified device.

Full Albums ~a ~a desolation row

Returns all albums on which “desolation row” is a track. If the track is on three albums, then all tracks from all three albums are returned.

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).

Limit ~limit ~limit=Limit_Total_Keys,Limit_Per_Key,Key_Fields

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

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

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

Lyrics lyrics= lyrics="you know your problem"
Media Type mediatype= mediatype=image
Mix ~mix g=rock ~mix=100,50%,{[Rating]=>3},50%,{[Rating]=<1}

play a mix of rock songs, ½ rated 4,5, and ½ unrated.

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
Sort sort= ~sort=[Year],[track #]
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)(2))
Width width= width=>80
Year – Album

(1) This field is customizable. To go Tools > Options > Library, select the field and press Edit. Type the abbreviation you would like to use in the Keywords box. You can enter multiple keywords; just separate them with a semi-colon (and no space).

(2) 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 table called "Special Modifiers" for more information

Special Modifiers, Functions and Expressions

For functions and expressions, see Media Center expression language.

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)

[Stan"

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

" ] exact ending

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

"stand]

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"
~s limit to s Megabytes ~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.

~t limit to t minutes ~t=60 returns 60 minutes of random music.
< 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.

~% limits percentage of hits ~%=50 "Bob Dylan" returns 50% of all tracks with Bob Dylan in any field.

Notes

  1. The "=" sign between the ~n, ~d or ~t and the value is optional (e.g., ~n30 vs. ~n=30 or ~s100 vs. ~s=100)
  2. Quotation marks and brackets must go in pairs. For example, Metallica] is invalid; it must be either [Metallica] or "Metallica] ).
  3. 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.


Examples

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

Imagefile=[]
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.
[Imagefile]=.,\
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

[dateimported]=<=7d
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).

mix

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.

limit

[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:
~limit=LIMIT_TOTAL_KEYS,LIMIT_PER_KEY,KEY_FIELDS
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.