| Topic 17: BEFORE and AFTER Operators
The BEFORE and AFTER operators work in the exact same manner as the NEAR operator, only you can now specify which terms or phrases need to come first or second. In the case of the BEFORE operator, the first term or phrase MUST occur before the second term or phrase within the specified word distance. In the case of the AFTER operator, the first term or phrase MUST occur after the second term or phrase within the specified word distance.
These operators do provide even greater control to your searches. But their drawbacks are even more severe than the NEAR operator. First, not only must your terms appear within the word distance, but you also must get the precedence right. Second, to our knowledge, only two major search engines support these operators [see Topic 38].
For these reasons we've included these operators here for the sake of completeness, but we do not recommend that you seriously consider using them . If you become an Internet 'power searcher' and you decide you disagree with this recommendation, then your skills have surpassed the purpose of this tutorial anyway.
Topic 18: AND NOT Operator
AND NOT removes any documents that contain that term or phrase. AND NOT is a unary operator; that is, it only works on the term or phrase that immediately follows the operator. It does not evaluate terms or phrases on both sides of the operator.
Most of the major search services support the AND NOT operator. It is sometimes called BUT NOT or NOT and sometimes denoted by placing a minus sign (-) before the term or phrase to be removed.
[NOTE: Technically NOT is the unary operator. For example,
NOT falcon
would exclude all documents that use the word falcon. The problem arises in the middle of a query. While some search engines allow NOT by itself, such as:
falcon NOT car
which would return documents using the word falcon but not car, the statement is technically ambiguous as to how to treat falcon. As a result, most engines require matching NOT in the middle of a query with AND or OR (OR NOT is rarely used). This removes the ambiguity and is the form we've adopted herein for use within the middle of a query.]
![[Example of AND NOT Operator]](images/srchtopic18a.gif)
Example of AND NOT Operator
Again using AltaVista document counts, here are the results for this operator:
|
endangered species |
143,786 |
|
peregrine falcon* |
14,510 |
|
endangered species AND NOT peregrine falcon* |
98,307 |
As discussed for other operators, search services indexing or retrieval accuracy or is not 100%.
AND NOT is a very powerful command that should be used with care. AND NOT works to narrow a search, subtracting all citations that contain the specified term or phrase.
AND NOT is completely non-discriminatory; it only takes one instance of a word or phrase to eliminate a document from your results set. As one source describes it, think of AND NOT logic sort of like peeling a potato [30]. A peeled potato is potato AND NOT peel. There's only one trouble: some of the good part of the potato goes with the peel. So, use the AND NOT operator with as much care as you would a paring knife, and only when you're absolutely sure you want to exclude a term or phrase from your results.
Generally, we do not recommend using AND NOT in the beginning iterations of a search. See what results are obtained in the early steps before applying this operator, if at all. Then, apply it incrementally to make sure you're not stripping away too much of the fruit.
A good example of where this might apply is with the falcon* search noted for the AND operator. The term falcon* returns references to cars, products, companies and place names, in addition to birds. Successively applying AND NOT to car*, product* and compan* is another approximation to the search bird* AND falcon*. On the other hand, using AND NOT with place* could be going too far by eliminating references to falcon bird sightings that occur in various places.
Though in this example we have a good AND qualifier in bird* for our interest in peregrine falcons, a suitably encompassing word such as bird* may not apply to other search topics. In these cases, AND NOT, judiciously applied, can be an alternate way of getting to the same end. |