Chapter 8
(continued)
Searching Documents With askSam
Boolean Searches
askSam lets you search using the Boolean operators AND, OR, and NOT.
EXAMPLE: You could conduct a Boolean Search in a file containing business letters to find all those sent to Illinois but NOT to Chicago.
There are two askSam search dialogs that use Boolean logic:
· Boolean Search Dialog (links words and phrases with Boolean logic).
· Search Dialog (combines the different askSam search commands - date, numeric, proximity, etc. - with Boolean logic).
Later in this chapter both of these search dialogs are described in detail, but first it is important to understand Boolean logic and how this is implemented in askSam.
Boolean Operators
askSam allows the use of three Boolean operators to combine the elements in a search. These operators are:
BOOLEAN OPERATOR ACTION
AND Selects Documents that meet two or more search criteria. For example a search to find resorts with: Golf AND Tennis AND Beach*
OR Defines multiple criteria for selecting Documents. For example a search to find resorts in: Florida OR Hawaii OR California
NOT Selects Documents that do not meet the criteria immediately following the Boolean operator NOT. For example find resorts that are: NOT expensive AND NOT crowded
NOTE: The Boolean operators can be entered in the Search Line.
EXAMPLE: Entering Miller or Davis in the Search Line retrieves Documents containing the word "Miller" or the word "Davis."
Priority in Boolean Searches
Complex searches (searches containing AND and OR operators) at times require a way to denote priority. In askSam you define how items in a search are grouped and prioritized by using parenthesis.
BOOLEAN REQUEST RETRIEVES
Red and White or Blue These three requests will act identically in askSam. They will retrieve
Red White or Blue Documents containing “Red and White” or Documents containing
(Red and White) or Blue “Blue”.
Red and (White or Blue) Retrieves Documents containing “Red” and “White” or Documents containing “Red” and “Blue”.
(Black and White) or Retrieves Documents containing “Black” and “White” or Documents
(Red and White and Blue) containing “Red”, “White”, and “Blue”.
Flag and ((Red and Blue) Retrieves Documents containing “Flag” and “Red” and “Blue” or
or (Black and White)) Documents containing “Flag” and “Black” and “White”.
There are three places where you can enter parenthesis to group Boolean requests:
· In the Search Line
· In the Boolean Search Dialog
· In the Search Dialog
Using the Boolean Search Dialog
1. Choose ACTIONS -> OTHER SEARCHES -> BOOLEAN.
The Boolean Search Dialog Box will appear.

2. Click in the “Search Term” field and enter the word or phrase that you wish to locate. Then press ENTER (or choose ADD).
The word or phrase will be added to the Search Term list, and you move to the next line of the Dialog Box.
3. Choose a Boolean operator - either AND, OR, or NOT. Press the SPACE key to see a list of the operators.
If no Boolean operator is selected, askSam defaults to the Boolean operator AND.
4. Move to the Search Term field and add the word or phrase.
5. Continue steps 3 and 4 until the search request is complete.
6. In the box marked “Search Logic” add parenthesis to group the request and set the proper priority. (See the previous section on Priority in Boolean Searches for details.)
7. Choose OK to start the search.
OPTION ACTION
ADD Adds a word or phrase to the Search Term list.
CLEAR Removes the selected line from the Search Term list.
CLEAR ALL Removes all entries from the Search Term list.
MATCH CASE When checked, the search will be case sensitive.
FUZZY When checked, the search will use fuzzy logic.
NOTE: (askSam Professional version) In an indexed file, the Boolean Search dialog displays the number of hits for your request. There is also a button to access the Word List.
To Search for all Documents containing Thomas Jefferson and Benjamin Franklin:
1. Choose ACTIONS -> OTHER SEARCHES -> BOOLEAN
2. Choose the CLEAR ALL Button to remove any entries from the Search Term list.
3. Type: Thomas Jefferson
4. Choose ADD or press ENTER.
5. Choose the Boolean operator AND.
6. Type: Benjamin Franklin
7. Choose ADD or press ENTER.
8. Choose OK.
askSam will execute the search request.
To Search for Documents containing Thomas Jefferson and Virginia or Documents with Benjamin Franklin and Philadelphia:
1. Choose ACTIONS -> OTHER SEARCHES -> BOOLEAN
2. Choose the CLEAR ALL Button to remove any entries from the Search Term list.
3. Type: Thomas Jefferson
4. Choose ADD or press ENTER.
5. Choose the Boolean operator AND.
6. Type: Virginia
7. Choose ADD or press ENTER.
8. Choose the Boolean operator OR.
9. Type: Benjamin Franklin
10. Choose ADD or press ENTER.
11. Choose the Boolean operator AND.
12. Type: Philadelphia
13. Choose ADD or press ENTER.
14. Add parenthesis in the Search Logic field.
(Thomas Jefferson AND Virginia) or (Benjamin Franklin AND Philadelphia)
Your Boolean Search Dialog Box will appear as follows:

15. Choose OK.
askSam will execute the search request.
Search Dialog
The Search Dialog allows you to combine all of askSam's search functions into a single request. The Search Dialog links the various searches together with Boolean logic. For example, using the Multiple Search Request, you can construct a search to locate all Documents:
· with a date from August to November 1963
· containing the words "Cuba" or "Soviet Union" in the field Title
· and containing the words "Castro" and "Khrushchev" in the same sentence.
The Search Dialog is a very powerful querying tool. It appears at various places in askSam - places where it is necessary to select Documents for an operation:
printing selected Documents
exporting selected Documents
deleting selected Documents
selecting Documents in the Report Writer.
Executing A Search
1. Choose ACTIONS -> SEARCH.
The Search Dialog Box will appear.

The Search Buttons on the left correspond to the search options described earlier in this chapter. Choosing a Search button (Word, Field, Date, etc.) accesses the dialog box for that search.
2. Choose the Search button for the search type you require (Word, Field, Date, Numeric, or Proximity).
The dialog box for the search type you selected will appear.
3. Enter your search request in the dialog box.
4. Choose OK.
You will return to the Search Dialog. The search you entered will appear in the Search List.
5. The Operator field lets you select a Boolean Operator for each item in the Search List. You can choose either AND, OR, or NOT.
If no Boolean operator is selected, an AND is understood and used to connect the search requests.
6. Repeat steps 2 through 5 until your search request is complete.
7. In the box marked “Search Logic” add parenthesis to group the request and set the proper priority. (See the previous section on Priority in Boolean Searches for details.)
8. Choose OK.
askSam will execute the search and open the Search Results Window at the bottom of the screen. The Documents retrieved by the search will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of the screen.
NOTES:
1. To store frequently used searches, use the Stored Searches command in the ACTIONS menu. See the section on Stored Searches later in this chapter.
2. You can save a group of selected Documents to a new askSam file. Choose EXPORT -> SELECT
DOCUMENTS. (See Exporting a Subset of Documents in the chapter on Importing and Exporting.)
3. (askSam Professional version) In an indexed file, the Search dialog displays the number of hits as you enter a request.
Search Example
As an example let's search for Documents with:
· FL or CA in the State field
· and 3000 or more in the Amount field.
1. Choose ACTIONS -> SEARCH.
2. Choose CLEAR ALL to remove any entries from the Search List.
3. Choose the FIELD button and enter FL in the Word or Phrase field and enter State[ in the second field.
4. Choose OK.
"FL" in “State[“ will be inserted in the Search List.
5. Choose the FIELD button again and enter CA in the Word or Phrase field.
6. Choose OK.
"CA" in “State[“ will be inserted in the Search List.
7. Set the Boolean operator to OR.
8. Choose the NUMERIC button and enter Amount[ in the first field, >= in the second field, and 3000 in the third field.
9. Choose OK.
“Amount[ >= 3000” is included in the Search List.
10. In the Search Logic field, place parenthesis around items 1 and 2. This sets the priority for the Boolean logic.

11. Choose OK.
askSam will execute the search request.
After executing a search, you can edit the request.
1. Choose ACTIONS -> SEARCH.
The Search Dialog will appear. The Search List contains the last request that was entered.
2. By double clicking on any item in the Search List, you can edit its contents. You can also change the Boolean operator or modify the parenthesis in the Search Logic. Use the following Buttons to modify the Search List:
BUTTON ACTION
EDIT Edits the selected line in the Search List.
CLEAR Removes the selected line from the Search List.
CLEAR ALL Removes all entries from the Search List.
3. Choose OK when your changes are complete.
The modified Search will be executed.
Counting Selected Documents
When you search in askSam, the Search Results Window is displayed. The Search Results Windows lists the Documents retrieved by your search. It also displays the number of Documents retrieved by the Search.

|