Searches

Searches are performed by entering the search into the query field, or by entering the search-command with a colon in-front of it in the command-line mode.

Simple searches

Simple searches take the following form:

au=Smith
  

That means, two letter code for the field you want to look through, then equal, then the string you want to search for. The special code 'al' will look through all entries. Here is a list of all codes:

code Field(s) to search through
id CITEID
bt Bibtype
au Author
ti Title
jo Journal
vo Volume
nu Number
pa Pages
mo Month
yr Year
kw Keywords
ab Abstract
no Note
ed Editor
pu Publisher
se Series
ad Address
en Edition
ch Chapter
hp HowPublished
tb Booktitle
or Organization
sc School
in Institution
ty Type
fi file
ur URL
sb SourceBibFile (which of the currently open databases does the file belong to)
an Annote
cr CrossRef
mi Micellaneous
al Search through all fields

As this list is hard to remember, it appears under the Query menu. Selecting one of the menu entries from that menu will simply insert the code to the query-entry field.

Once you have finished entering you query into the query-entry, press enter. All entries that match the query will be marked (you can move among the marked entries using shift-up/shift-down/alt-up/alt-down or the two leftmost arrow buttons on the button bar. The status bar will show the result of the query. Thus it might show:

Mod: Y Status: OK  6 matches found and selected  =:) Database: /home/dirk/pd.bib
  

This means that 6 matches were found in the last query. After a shot time, the status line will change to:

Mod: Y Status: OK  6 00022 of 00030 (00006 selected) Database: /home/dirk/pd.bib
  

Showing that currently 6 entries are selected.

An unsuccessful search will display an appropriate message, and will not change the current selection. A successful query erases the previous marks.

The command line command for a query is the query, with a colon in front of it, thus:

:au=smith
  

Boolean queries

It is possible combine several queries into a boolean query. For this use the words 'and' and 'or' and use parentheses to group the query element. Thus you could enter:

(au=smith or au=eva) and ti=the
  

To find all articles with author smith or eva for which the title contains the word 'the'.

Notice that the boolean not is currently not implemented. To use it, you have to use the flip marks command, either form the 'Edit->Flip all marks' menu, or the 'flip' command line command. See below for how such boolean searches

Using old query results in boolean operations

You can use old query results in the query. Each query result is assigned a number. To invoke that result from the query history in a new search, enter the hash mark (#) followed by the number of the query, thus:

#2 or au=lachmann
  

You can also go back to old query results by double-clicking on them in the query window.

Saving the current marks for later use

Not only queries can change the marks. The user can mark and unmark entries, or even flip all marks. When new entries are imported, they are marked. Thus it is sometimes useful to save the current marks for later use. To do this select 'Query->Store current marks', or use the 'mark' command from the command line interface. These marks are then assigned a number, and can be used in boolean queries as described above.

Thus, to find all papers writen by the author smith, but not by the author eva, do the following:

  1. Open the query window, to have an overview of what is happening.

  2. au=eva

  3. Edit->flip all marks

  4. Query->Store current marks, and notice in the query window what number was assigned to that mark. We'll assume it is #2.

  5. #2 and au=smith

That's it...

Marking entries by aux files

Sometimes it is useful to handle all entries that were used in a certain LaTeX file. For this one can use the .aux files generated during the latexing process. To select all entries mentioned in a certain aux file, choose the menu entry "Edit->mark according to aux file", use the command line syntax select aux filename all entries from that file are selected according to the CITEIDs. Notice that the old entries are not erased, which enables one to mark entries from multiple files. (See also interaction with LyX.)

Marking entries with double CITEIDs

bibtex doesn't handle well multiple entries with the same CITEID. To weed these out, you can select 'Edit->mark double CITEIDs' from the menu, or invoke the command 'mark double CITEIDs' from the command line. Entries will then be sorted by CITEID, and double CITEIDs will be marked.