Chapter 8
(continued)
Searching Documents With askSam
Using the Search Line
askSam's Search Line is the direct route to your information. Using the Search Line it is never necessary to specify a field for searching. Simply type in a name, company, date or any other word, and askSam will find it.
Search Line Ž

1. Open the file you want to search.
2. Click in the Search Line or press ESC to move to the Search Line.
3. Type the word or phrase for the search and press ENTER.
askSam searches from the beginning of the active file. The Search Results Window will open at the bottom of the screen. The Documents containing the word or phrase you entered will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of your screen.
NOTE: The Search Line also contains two buttons that affect searches. The Case Sensitive button toggles the search from Case Sensitive to Non-case Sensitive. The Fuzzy Search button turns on and off askSam's Fuzzy Search.
To search for a phrase from the Search Line, the phrase must be enclosed in square brackets [ ]. Entering multiple words that are not enclosed in square brackets results in a search for Documents containing all the requested words, but the words do not have to appear together as a phrase.
For example:
REQUEST FINDS
world bank Any Document containing the word "world" and the word "bank". This means that a Document containing the sentence, “In today's world, the bank is an important institution” would be selected.
[world bank] Finds only Documents where the actual phrase "world bank" appears.
NOTE: Phrases must only be enclosed in brackets when they are entered in the Search Line. When using the search commands in the Actions Menu, make sure you do NOT use brackets.
It is possible to conduct more than simple Searches from askSam's Search Line. More complex requests usually involve the use of askSam commands. For certain searches or lists, you may find it is faster to enter the requests from the Search Line.
EXAMPLES:
To search for all documents containing Ireland or England, you can enter the following request in the Search Line:
Ireland or England
The "or" in the example above is an askSam command.
To search for all documents where the word GORE and BUSH appear “near” each other (within five words), you can enter the following request in the Search Line:
Gore near Bush
The "near" in the example above is an askSam command.
To search for all documents where the PRICE field is less than 100, you can enter the following request in the Search Line:
Price[ < 100
NOTE: If you prefer to enter requests directly in the Search Line (instead of using Dialog Boxes), the COMMAND4.ZIP file on our Internet FTP site contains a list of the commands and descriptions of their functions.
You can also turn on the "Show Commands from Dialogs" option in the TOOLS -> OPTIONS
Menu. This option activates a command message box that displays the commands to enter in the Search Line to perform any askSam search. The message box is displayed after executing any command from the Actions Menu or when running a report.
If you enter a field name in the Search Line, the contents of that field will be output to a new window when you press ENTER. For example entering City[ outputs a list of cities.
If you need to search for a field name, type in the field name followed by an asterisk ( * ). For example: City[*
askSam saves a list of the last items you entered in the Search Line. Click the arrow to the right of the Search Line to display the drop down list of the last entries. You can select any item in this list and:
· Press ENTER to re-execute the Request.
· Type any character to delete the Request.
· Press HOME, END, or an ARROW key to edit your Request.
NOTE: When the cursor is in the Search Line, pressing the UP and DOWN ARROW KEYS, displays the items previously entered in the Search Line. Pressing ALT+DOWN ARROW displays the drop down list of the last entries.
Searching in Fields
The Search in Field command allows you to search for a word or phrase in a specific Field.
For example: to find a Document containing "White" in the Name Field, use the Search In Field command. Simply doing a search for "White" from the Search Line or the Boolean Search Dialog Box would find "White" anywhere in the Document not just in the Name Field.
1. Choose ACTIONS -> OTHER SEARCHES -> FIELD.
The Search in Field Dialog Box will appear.

2. Enter the word or phrase you wish to find.
3. Enter the name of the Field in which you wish to search.
4. Set any options.
You can choose from the following options:
OPTION DESCRIPTION
Empty Find documents where the field is empty. When checked, askSam searches for Documents where the selected field is empty.
Not Empty Find documents where the field contains data. When checked, askSam searches for Documents where the selected field contains data.
Fuzzy When checked, askSam uses fuzzy search logic to locate the word or phrase.
Multi-line field Check this option if the field you are searching is a multiple line field.
Match only the first (Default) If a Document contains multiple occurrences of the field you occurrence of the field. are searching, askSam only searches in the first occurrence of the field.
Match any occurrences of If a Document contains multiple occurrences of the field you are field. searching, askSam looks for a match in any one of these fields.
Match all occurrences of field If a Document contains multiple occurrences of the field you are searching, askSam will only select the Document if the search word or phrase occurs in all of the fields.
5. Choose OK.
askSam will search for Documents containing the word or phrase in the field you specified. The Search Results Window will open 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. The Search in Field Command assumes that your field is a single line. To search in a multiple line field, check the Multi-line Field Box before executing the search. The end of a multiple line field is a closing bracket (]) or the end of the Document.
2. (askSam Professional version) In an indexed file, the Search in Field dialog displays the number of hits for your request. There is also a button to access the Word List.
3. To locate Documents where a specified Field does NOT contain a specific Word or Phrase, use the SEARCH command from the ACTIONS Menu. For example, searching for all Documents that do not have OK in the field DONE. (See Search Dialog later in this chapter.)
4. To locate Documents using more than one Field (such as Blue in Eyes[ and Brown in Hair[ ), use the SEARCH command from the ACTIONS Menu. (See Search Dialog later in this chapter.)
5. If a list of Field names does not appear in the drop down menu, check two things:
An Entry Form must be defined containing the field names.
The Field Character setting in the FILE -> PROPERTIES Dialog Box must contain the
proper Field Character.
Numeric Searches
With askSam's numeric search you can select Documents based on a numeric comparison. In order to conduct a numeric search, the numbers in the Documents must be contained in fields. To execute a numeric search:
1. Choose ACTIONS -> OTHER SEARCHES -> NUMERIC.
The Numeric Search Dialog Box will appear.

2. Enter the name of a field containing a numeric value.
3. Choose the numeric operator (<, >, =, <=, >=, <>).
4. Enter the Numeric Value.
5. Choose OK.
askSam will retrieve all Documents containing a value in the specified Field which meets your numeric criteria. The Search Results Window will open at the bottom of the screen. The retrieved Documents will be listed in the Search Results Window. The first retrieved Document will be displayed in the top portion of the screen.
NOTES:
1. The “Match only the first occurrence of the field” dropdown menu has the following options:
OPTION DESCRIPTION
Match only the first (Default) If a Document contains multiple occurrences of the field you occurrence of the field. are searching, askSam only searches in the first occurrence of the field.
Match any occurrences of If a Document contains multiple occurrences of the field you are field. searching, askSam looks for a match in any one of these fields.
Match all occurrences of field If a Document contains multiple occurrences of the field you are searching, askSam will only select the Document if the search is valid in all of the fields.
2. If a list of Field Names does not appear in your drop down menu, check two things:
An Entry Form must be defined containing the field names.
The Field Character setting in the FILE -> PROPERTIES Dialog Box must contain the
proper Field Character.
3. (askSam Professional version) To speed numeric searching in large files, you can specify numeric fields for askSam to index in the FILE -> INDEX Dialog Box.
Proximity Searches
A proximity search allows you to search for two words or phrases occurring within a specified proximity of one another. This enables you to use the natural elements contained within blocks of normal text (words, lines, sentences and paragraphs) to tailor a search.
EXAMPLES: You can find all Documents where "Gore" and "Bush" appear in the same paragraph. Or you could locate the Documents containing "GM" and "Ford" within 5 words of one another.
1. Choose ACTIONS -> OTHER SEARCHES -> PROXIMITY and the Proximity Search Dialog Box
will appear.

2. Enter the first word or phrase of the proximity search.
3. Enter a number in the quantity field - or leave it blank if the words are to appear in the same sentence, line, or paragraph. If, for example, you wanted GM and Ford within 5 words of one another, you would enter "5".
4. Choose a structural unit for the search (either words, sentences, lines or paragraphs).
5. Choose a direction for the search. Your choices are:
Before
On Either Side of
After
In the Same
This selection defines the proximity of the search. If you select IN THE SAME, both words must occur in the same structure (sentence, paragraph, or line).
6. Enter the second word or phrase.
7. Choose OK.
askSam will execute the proximity search, open the Search Results Window, and display the Documents retrieved. The first retrieved Document will be displayed in the top portion of the screen.
NOTES:
1. The Output Hits option opens a new window and outputs the hits from your proximity search in this window.
2. The Fuzzy option uses fuzzy logic when searching for the word or phrase.
3. (askSam Professional version) In an indexed file, the Proximity dialog displays the maximum number of hits for the request. The actual number is displayed when the Documents are retrieved in the Search Results Window.
4. The Proximity Type setting enables you to determine the extent of the proximity search. You can choose either:
· Word or Phrase - Searches the entire text of every Document in the file. (Default)
· First Structure of Each Document - limits the search to a word or phrase in the first word, sentence, line, or paragraph of a Document.
|