Appendix B (Advanced Filter Syntax)
Previous  Top  Next

If you are using the Basic Filter, you don't need to use this syntax.

Boolean and other search logic are rich and complex topics which often take up a full semester of a college-level course. Obviously, a full explanation is beyond the scope of this Appendix. However, most Web searches do not require a full range of Boolean expressions but rely on a limited subset of the possible queries.

In this section, we present some examples of valid expressions in both standard English and their search syntax counterparts. The syntax examples given here could be all or part of an expression entered in the Query text box of WebSeeker's Advanced Refine dialog.

Individual Word Searches

To search for the word "shark," simply enter it as is:  
 
shark  

Phrase Searches

To search for the phrase "great white shark," use parenthesis and quotes:  
 
("great white shark")  
 
That last search looks for all three words in the order shown with no intervening words. Sometimes you would like to maintain the specified ordering but are willing to accept intervening words. To find "men are attacked by the great white shark," you could type the following which allows 3 words between each pair of words:  
 
("men attacked shark :3")  
 
Of course, the above phrase would also find something like "men are attacking and killing sharks."  
 
Sometimes, because you're unsure of all of the words in a phrase, you may wish to specify that one or more of the words in the phrase are "expendable." For example, the following example specifies that any two of the words specified may be missing and still cause a match:  
 
("men and women are attacked and killed by sharks :3:2")   
 
If the default span of zero is desired, the previous expression could be entered as:  
 
("men and women are attacked and killed by sharks ::2")  

Proximity Searches

To find two or more words "near" each other but in any order, use a proximity search. For example enter:  
 
[taxes deductions]  
 
This finds .".taxes after all the deductions.." as well as .".deductions figured from state taxes..."  
 
The brackets indicate that you want to find the words within a certain span or range. The default width of the span is 20 words. You may override the default: For example, here we make the span 10:  
 
[federal deductions taxes :10]  
 
You may also specify an expendable count. In the following example, we allow two words to be missing from those specified:  
 
[federal and state deductions taxes :10:2]  

Boolean Searches

To find all documents containing "shark," "whale" or "dolphin" (or any combination thereof), use the vertical bar character:  
 
shark | whale | dolphin  
 
To find all documents containing both "sea" and "ocean," use the ampersand character:  
 
sea & ocean  

Nested Expressions

Any place that you can use a single word in an expression, you may also use a phrase, proximity, or OR ("|") sub-expression. Here are some examples:  
 
failed | "gave up"  
("deep sea diving | scuba")  or equivalently ("deep sea (diving | scuba)")  
["cookies and cream" sweets]  
(" ("Mother Theresa") ("India") :20")  
 
Notice that phrases within phrases require parentheses.  

Parentheses

Parentheses may be used to specify the order in which you want the expression to be evaluated. In the following example, we want the AND (&) to be evaluated before the OR (|):  
 
(fast & cars) | racing  
 
In the next example, we want the OR (|) to be evaluated before the AND (&):  
 
Indy 500 & (fast | cars)