The most useful trick of boolean
algebra is to combine your search keywords with the
operator AND, which ensures that the web pages returned include
all of those keywords. This lets you search for several
keywords at once to narrow down your search to just the most
relevant content.
While some search engines
assume the AND function by default if you
just list keywords all in a row, others will consider some
of the words optional, some will combine the
keywords with
the
OR operator instead, and others apply different optimization
rules that can lead to unpredictable results. If not sure, use
the site's advanced search function and find out how to ensure
your keywords are all considered mandatory -- combined with AND.
To illustrate the numerical advantage of the AND combination
over the OR combination, consider the difference between the
results returned by the searches "mozart or biography" and "mozart
and biography".
- mozart or biography. The
search engine finds pages that include the word "mozart", then finds the pages that include
the word "biography", and then returns the union of the two lists
-- all of the pages that contain the word "mozart" or the
word "biography".
- mozart and biography. The search engine finds
pages that include the word "mozart", then finds pages that include
the word "biography", and then returns
the intersection of the two lists -- only those pages that
include both of
the words.
The results of searches on Alta Vista and Google listed below
show that the AND search
returns many times fewer pages than the OR search, making
it that much more focused and useful.
| Search
Query |
Jul
2000
#
of Pages
Alta Vista
|
Dec
2004
#
of
Pages
Google
|
|
mozart
|
425,747 |
7,900,000 |
| biography
|
3,026,098 |
50,000,000 |
| biography
OR mozart |
3,306,047 |
* 27,100,000 |
| biography
AND mozart |
16,145 |
276,000 |
* Approximation
returned by search engine;
unknown why less than for "biography" alone.
NEAR. The Alta
Vista search engine used to be the only Internet search engine
that also supported an interesting search innovation, the NEAR operator,
which was like
the AND operator in that both operands had to be present, but with the
added condition
that the terms must also be "near" to one another, which Alta Vista
defined as within ten words. In practice, that usually meant they
were in the
same
or
adjacent
sentences,
producing a very tight correlation between the search terms.
While Alta
Vista still supports the NEAR operator for backward compatibility,
it appears
to
have incorporated the concept into the AND operator, since they both
return the same number of results. Hopefully someday this useful operator
will make a return on a major search engine, since it was particularly
useful when you received a
lot of
pages with the right keywords
but
wanted to ensure they were all within the same sentence of two.
For example,
the author once was looking for Winston Churchill's middle
name, but found that the following search did not return pages where the
two phrases were sufficiently related:
On the
other hand, use of the NEAR operator returned pages where
the two phrases were used in the same sentence, which provided several hits in
the top ten where Mr. Churchill's middle moniker could be readily found:
"winston
churchill" NEAR "middle name"