Wednesday, May 26, 2010

Comparison of Boolean Searching in the Old vs. New Catalog

Basic Overview of Boolean Searching in our Catalog
One of the nice features of our catalog is its ability to use Boolean Operators such as AND, OR and NOT. By default, our catalog's keyword searches combine all the words you enter with AND. So, if you choose a Subject Keyword search and type Washington state, the catalog looks for subjects that contain the word Washington and the word state. However, let's say we were searching for books about cake or candy. An easy way to do this is to click on Advanced. Then, in the first drop down box, choose Subject Keyword and enter the word cake. Change the right drop down box from AND to OR. On the second line, choose another Subject Keyword search and this time enter the word candy. Click the red arrow to submit the search. You can see the results here.

Since we're using the same search index for both words, we can also do this search on the Basic Search page. Click on Basic and choose the Subject Keyword index. Then, in the text box, type cake OR candy1 and click the red arrow. This gives us exactly the same results as the Advanced Search did.

Unfortunately, the catalog doesn't have an order of precedence for its operators (AND, OR, NOT). So, when searching with multiple words, it's best to enclose each group of words with parenthesis2. For example, if I were looking for books by Dan Brown or James Patterson, I would choose an Author Keyword search and then type (Dan Brown) OR (James Patterson) and click the red arrow.

Using the Advanced Search, let's try a Title Keyword search for "Trophy Wife". Leave the Boolean Operator as AND. Next to Author Keyword, type (Diana Diamond) – make sure to include the parenthesis – and click the red arrow to search. This search will return all records that have the phrase Trophy Wife in the title where the author's name contains the words Diana Diamond. Click the Refine Search link to go back. This time, instead of AND, change the operator on the first line to OR and click the red arrow to search. This will return all titles that include the phrase Trophy Wife (regardless of author) and all books that Diana Diamond has written. Refine the search again and this time choose NOT. This will return all books that have the title phrase Trophy Wife that are not written by Diana Diamond. Here are the results. The last Boolean choice is the XOR. This is a funny one. When you search with the XOR it will return all books that include the title phrase Trophy Wife and all books that are written by Diana Diamond except for the books with the title Trophy Wife written by Diana Diamond (see the results).

Features and Bug Fixes in the New Catalog

1) In our current catalog, it doesn't matter whether Boolean Operators are entered in upper or lowercase. However, this means that it can't tell when the word NOT is used as part of a title or as a search command. As a result, searching for the book Size 12 is Not Fat by Meg Cabot fails because it is looking for all titles that have the words Size 12 but NOT the word fat in the title. The new version of our catalog fixes this problem. In order for the catalog to recognize a word as a boolean operator, it must be in all uppercase. Thus, if you search in our new catalog for Size 12 is NOT Fat the search still fails because NOT is all in capitals and thus is used as a search command. However, searching for Size 12 is Not Fat works as a normal borrower might expect. Note: Because of this change, it is best not to type in all caps when searching the new catalog since this would mean you're telling the catalog to use NOT as an operator.

2) It use to be that the catalog did not automatically group words in the same search box together. When using the AND operator, it doesn't matter. However, if you use any of other three operators, OR, NOT or XOR, you way not retrieve the results you wanted. For example, let's say I would like to retrieve all books titled To the Last Man that were not writter by Zane Grey. I might be tempted to do a Title Keyword for "To the Last Man", choose NOT, and then an Author Keyword for Zane Grey. You can see that no results are retrieved. However, if do the exact same search by put parenthesis around Zane Grey's name, I can see that there is a book by Jeff Shaara that matches my search query. Happily, this has changed in the new catalog. Once we switch to the new catalog in most cases it won't matter whether or not you group words together using parenthesis. NOTE: If you are using Boolean Operators from the Basic search page, it is still best to use parenthesis to group words together.

3) The new catalog has another bug fix dealing with Boolean Operators. Let's say I wanted to refine a search that used the NOT operator. In our current catalog, when you click Refine Search it sets all the boolean operators back to AND even if your previous search was using something different. This annoyance has been fixed in our new catalog.

4) In our current catalog, the only way to indicate that you want to exclude words from a search result was to type NOT. However, now you can also use - to indicate the catalog should exclude some results. This is similar to how you exclude words when using Google. For example, let's say that I want to find the book It Happened One Autumn but I don't want the large print copy to show up. Performing a Title Keyword search for "It Happened One Autumn" -large will return my desired result. Note: There is no space between the dash and the word you wish to exclude.

No comments:

Post a Comment