Searching with Beagle

Contents

6.1. Using Beagle
6.2. Search Tips
6.3. Performing a Property Search
6.4. Setting Search Preferences
6.5. Indexing Other Directories
6.6. Preventing Files and Directories from Being Indexed
6.7. Selecting Data Sources to Index
6.8. Disabling Beagle
6.9. For More Information

Beagle is a search tool that indexes your personal information space (normally your home directory) in order to carry out search requests. Using Beagle, you can find documents, e-mails and attachments, Web history, IM/IRC conversations, address book contacts, calendar appointments, notes, source code, images, music (and video) files, archives (and their contents) and applications.

Using Beagle

To use Beagle, click Computer, enter your search terms in the Search field, then press Enter. The results are displayed in the Desktop Search dialog box.

Figure 6.1. Desktop Search Dialog Box

Desktop Search Dialog Box

You can use the results lists to open a file, forward it via e-mail, move it to trash, or display it in the file manager. Simply right-click an item in the results list and select desired option. The options available for an item in the results list are determined by its filetype. Selecting a file in the list displays a preview of the file and information such as the title, path, and date the file was last accessed or modified.

Figure 6.2. Desktop Search Dialog Box With a File Selected

Desktop Search Dialog Box With a File Selected

Use the Find In menu to limit your search to sources of a specific type (such as applications, documents, pictures, emails, web pages or contacts). The View menu lets you sort the items in your results list according to name, relevance or the date the file was last modified.

You can also access Desktop Search by clicking Computer+More Applications+System+Search or start it from a terminal using the beagle-search.

Search Tips

  • You can use both uppercase and lowercase letters in search terms. Searches are not case-sensitive.

  • To search for optional terms, use OR (for example, apples OR oranges).

    [Important]

    The OR has to be capitalized when used to indicate optional search terms.

  • To exclude search terms, use a minus sign (-) in front of the term you want to exclude (for example, apples -oranges will find results containing apples but not oranges).

  • The root form of a search term is used when searching (for example, a search for driving will match drive, drives, and driven).

  • To search for an exact phrase or word, put quotation marks ("") around the phrase or word.

  • Common words such as "a”, “the” and “is” are ignored.

Performing a Property Search

By default, the Beagle search tool looks for search terms in the text of documents and in their metadata. To search for a word in a particular property, use property:query. For example, author:john searches for files that have “john” listed in the Author property.

Table 6.1. Supported Property Keywords

Keyword

Applies to

Property

album

Music files

Name of album

artist

Music file

Name of artist

author

Document

Author of the document (same as Creator of the Document)

creator

Document

Creator of the document, mapped to dc:creator (for example, creator of PDF files)

email

Address book

E-mail address

emblem

File

Emblem used in Nautilus

extension or ext

File

File extension (for example, extension:jpeg or ext:mp3). Use extension: or ext: to search in files with no extension.

genre

Music file

Genre of music

imagecomment

Image file

Comments and descriptions found in images that have an IPTC caption or Exif comment

imagemodel

JPEG image

Model of camera (for example, EOS2D)

imagetag

Image file

F-Spot and DigiKam image tags, and IPTC keywords

inarchive

File

Use inarchive:true for files inside an archive

inattachment

File

Use inattachment:true for email attachments.

mailfrom

E-mail

Name of sender

mailfromaddr

E-mail

E-mail address of sender

mailinglist

E-mail

Id of mailing list (for example, dashboard-hackers.gnome.org)

mailto

E-mail

Name of recipient

mailtoaddr

E-mail

E-mail address of recipient

speakingto

Chat

Speaker

title

Document

Title of document, mapped to dc:title (for example, title tag of HTML files)


Property searches follow the rules mentioned in Section 6.2, “Search Tips”. You can use property searches as an OR query or as an exclusion query, and phrases can be used as query. For example, the following line will search for all PDF or HTML documents containing the word “apple” whose author property contains “john” and whose title does not contain the word “oranges”:

apple ext:pdf OR ext:html author:john -title:oranges

Setting Search Preferences

Use the Search Preferences dialog box to set search preferences for Beagle.

  1. Click Computer+More Applications+System+Search Settings.

    You can also click Search+Preferences in the Desktop Search dialog box.

    Search Preferences dialog box
  2. Choose from the following options:

    Start search & indexing services automatically:  Select this option if you want the search daemon to start automatically when you log in to your session (this option is selected by default). If you want to use Beagle's Search functionality, the daemon must be running.

    Index data while on battery power:  Select this option if you want your data to be indexed when your computer is operating on battery power. Disabling this option is particularly useful if you are using openSUSE on a laptop and you want to stop indexing when your laptop is running on battery power.

    Index more aggressively while the screen saver is running:  If the screen saver is running, it is assumed that you are not using computer actively and more resources are dedicated to indexing. This option does not apply if computer is running on battery power.

    Automatically start searching after the user has stopped typing:  Select this option if you want Beagle to start searching as soon as you stop entering text in the Find field in the Desktop Search window. This option has no effect on the Search field in the main menu.

    Display the search window by pressing:  Choose the keystrokes that will display the Desktop Search window by specifying any combination of Ctrl, Alt and a function key. F12 is the default keystroke.

  3. Click OK.

Indexing Other Directories

By default, Beagle indexes your home directory only. If you do not want your home directory to be indexed, uncheck the Index my home directory option on the Indexing tab of the Search Preferences dialog box. If you want to index additional folders, follow these steps:

  1. Click Computer+More Applications+System+Search Settings.

    You can also click Search+Preferences in the Desktop Search dialog box.

  2. Click the Indexing tab.

    Beagle indexing preferences
  3. Click Add in the General section of the dialog box.

  4. Select the directory you want to index and click Open.

    Make sure you have rights to the directories you add.

  5. If you want to remove a directory from the list of indexed directories, select it in the list, then click Remove.

  6. Click OK.

Preventing Files and Directories from Being Indexed

Use the Search Preferences dialog box to specify resources that you do not want indexed. These resources can include directories, patterns, mail folders, or types of objects.

  1. Click Computer+More Applications+System+Search Settings.

  2. Click the Indexing tab.

  3. Click Add in the Privacy section.

  4. Select a resource to exclude from indexing, then specify the path to the resource or filename pattern.

  5. Click OK twice.

Selecting Data Sources to Index

Beagle can index various data sources, data from various applications (for example Evolution mails, memos and tasks, Pidgin conversations, Tomboy notes or Nautilus metadata), files, applications, documentation, man pages and others. To select which data sources Beagle should index, follow these steps:

  1. Click Computer+More Applications+System+Search Settings.

  2. Click the Data Sources tab.

  3. Check the data sources you want to be indexed.

  4. Click OK.

Disabling Beagle

On low-end computers, Beagle may use too much resources. To disable Beagle, click Computer+More Applications+System+Search Settings+Searching and uncheck the Start search & indexing services automatically option.

You can also disable Beagle by editing configuration files in the /etc/beagle/crawl-rules/ directory. To disable Beagle, set option CRAWL_ENABLED to no in all crawl-*files in the directory.

For More Information

More information about Beagle can be found on the following Web site: