# Smart Libraries

The search feature makes it easy to narrow down the view of books in a single library according to a single search term. In order to support more complex filtering, in a persistent form, &app; uses Smart Libraries.

Smart Libraries are listed beneath the actual libraries in the application side pane. They do not actually contain books, but rather a set of rules describing which books you wish to see. The books from all libraries which satisfy the set of rules will be displayed. You cannot directly add books to a Smart Library.

## Creating a new Smart Library

To create a new Smart library, choose Library New Smart Library... from the main menu. The New Smart Library dialog allows you to define the rules which select which books will be displayed. Each rule is displayed on one line. The first drop-down list gives you the choice of what attribute of a book you are concerned with (e.g. Title or Publisher). The second drop-down gives a choice of conditions for that attribute (e.g. contains). Depending on the attribute you choose, there may be a text box to enter text or numbers to further define the condition. You can add another rule by clicking on the + button. You can remove any rule (except the last remaining rule) by clicking on the - button.

An example will illustrate the use of Smart Libraries. Let us suppose you have a large collections of books by Terry Practchett and you add the tag discworld to all the books in the Discworld series. Let us create a Smart Library for all his non-Discworld books.

### A New Smart Library dialog

A New Smart Library dialog showing two rules; The first is Author contains Pratchett, the second is Tags does not contain discworld.

This is quite simple. We make the first rule select all Pratchett books by selecting Author and contains and typing Pratchett into the text box. Now we click + to add another rule. With the second rule we narrow the selection by selecting Tags and does not contain and typing discworld into the text box. Also be sure that Match all the following rules is selected. When you click New, the new Smart Library will be created, and you should see the books it contains. You will also be able rename the Smart Library immediately, or you can accept the default name.

Remember, some attributes are boolean - they can either be set or not set (for example the Own attribute). A text box is not required for rules concerning these attributes.

## Editing a Smart Library

To edit a Smart Library, select it in the Smart Library list, right-click the Smart Library name and select Properties from the pop-up menu. The Properties dialog is the same as the New Smart Library dialog; you can modify, add and delete rules.

## Renaming a Smart Library

To rename a Smart Library, simply click on its name twice in the Smart Library pane, and type in the new name. You can also right-click on the name, and select Rename from the pop-up menu.

## Deleting a Smart Library

To delete a Smart Library, select it in the library pane, either right-click and select Delete, choose Edit Delete from the main menu, or press the

    Delete

key on your keyboard. &app; will ask for confirmation before deleting the Smart Library.

Deleting a Smart Library does not delete any books, just the set of rules by which books are selected for display. However, the deletion cannot be undone.