Chapter 14. Using Beagle

Table of Contents

14.1. Indexing Data
14.2. Searching Data

Beagle is a search tool that indexes your personal information space to help you find whatever you are looking for. You can use Beagle to find documents, e-mails, Web history, Instant Messenger and ITC conversations, source code, images, music files, applications, and much more.

Beagle supports the following data sources:

It also supports the following file formats:

Beagle automatically indexes everything in your home directory, but you can choose to exclude certain files or directories. Beagle also includes a variety of tools that you can use to search your data.

14.1. Indexing Data

The Beagle daemon (beagled) automatically performs all indexing. By default, everything in your home directory is indexed. Beagle detects changes made to your home directory and reindexes the data accordingly.

  • Files are immediately indexed when they are created, are reindexed when they are modified, and are dropped from the index when they are deleted.

  • E-mails are indexed upon arrival.

  • IM conversations are indexed as you chat, one line at a time.

Indexing your data requires a fair amount of computing power, but the Beagle daemon tries to be as unobtrusive as possible. It contains a scheduler that works to prioritize tasks and control CPU usage, based on whether you are actively using your workstation.

14.1.1. Preventing Files and Directories from Being Indexed

If you want to prevent a directory (and all of its subdirectories) from being indexed, create an empty file named .noindex and place it in the directory. You can add a list of files and directories to the .noindex file to prevent those files and directories from being indexed. Wild cards are permitted in the .noindex file.

You can also put a .neverindex file in your home directory with a list of files that should never be indexed. Wild cards are also allowed in this file. Use the same wild cards as you use for glob (for example, f*le??.txt). You can also use more powerful regular expressions by adding a forward slash both before and after your pattern (for example, /file.*.txt/). For more information, see the glob-UNIX Web site (http://docs.python.org/lib/module-glob.html).

14.1.2. Indexing Manually

Beagle has an effective system for determining when to index your files and it tries to not interfere with other applications you might be running. It intentionally times its indexing based on load and whether your system is idle, so as not to adversely affect your desktop experience. However, if you want to index your home directory right away, enter the following command in a terminal window before running Beagle:

export BEAGLE_EXERCISE_THE_DOG=1

14.1.3. Checking the Status of Your Index

Beagle includes the following commands to let you see the current indexing status:

beagle-index-info

Displays how many documents have been indexed and what type of documents have been indexed.

beagle-status

Displays the current work the Beagle daemon is doing (on an ongoing basis).