Connectors used in boolean searches
Use the AND connector in a search request to connect two expressions, both of which must be found in any document retrieved. For example:
apple pie and poached pear would retrieve any document that contained both phrases.
(apple or banana) and (pear w/5 grape) would retrieve any document that (1) contained either apple OR banana, AND (2) contained pear within 5 words of grape.
AndAny lets you combine a search for required search terms with other terms that are optional. The words before AndAny are required, and the words after AndAny are optional. Example:
(apple and pear) AndAny (grape or banana) would find any word that contains apple and pear, and grape and banana will also be counted as hits.
Use the OR connector in a search request to connect two expressions, at least one of which must be found in any document retrieved. For example, apple pie or poached pear would retrieve any document that contained apple pie, poached pear, or both.
Use the W/N connector in a search request to specify that one word or phrase must occur within N words of the other. For example, apple w/5 pear would retrieve any document that contained apple within 5 words of pear. The following are examples of search requests using W/N:
Some types of complex expressions using the W/N connector will produce ambiguous results and should not be used. The following are examples of ambiguous search requests:
In general, at least one of the two expressions connected by W/N must be a single word or phrase or a group of words and phrases connected by OR. Example:
dtSearch uses two built in search words to mark the beginning and end of a file: xfirstword and xlastword. The terms are useful if you want to limit a search to the beginning or end of a file. For example, apple w/10 xlastword would search for apple within 10 words of the end of a document.
The pre/N connector is like W/N, but it also requires that the first expression must occur before the second. Example:
Use NOT in front of any search expression to reverse its meaning. This allows you to exclude documents from a search. Example:
NOT standing alone can be the start of a search request. For example, not pear would retrieve all documents that did not contain pear.
If NOT is not the first connector in a request, you need to use either AND or OR with NOT:
The NOT W/ ("not within") operator allows you to search for a word or phrase not in association with another word or phrase. Example:
Unlike the W/ operator, NOT W/ is not symmetrical. That is, apple not w/20 pear is not the same as pear not w/20 apple. In the apple not w/20 pear request, dtSearch searches for apple and excludes cases where apple is too close to pear. In the pear not w/20 apple request, dtSearch searches for pear and excludes cases where pear is too close to apple.
When you index a database or other file containing fields, dtSearch saves the field information so that you can perform searches limited to a particular field. For example, suppose that you indexed an Access database with a Name field and a Description field. You could search for apple in the Name field like this:
dtSearch automatically collects field information from: databases, META tags in HTML files, XML, and Office and WordPerfect document properties.
For more information on field searching and metadata, see "Field Searching".
You can also define a field at the time of a search by designating words that begin and end the field, like this:
The beginning TO end part defines the boundaries of the field. The CONTAINS part indicates the words or phrases you are searching for in the field. The only connector allowed in the beginning and end expressions in a field definition is OR. Examples:
The field boundaries are not considered hits in a search. Only the words being searched for (john smith, oak, lane) are marked as hits.