Boolean and advanced searching techniques
This article is technical in nature and explains how to refine your searches using operators. These include operators and characters that search for words, fields, dates, and numbers in specific combinations which you use to refine your searches.
Searching itself is explained here.
Search operators in MasterFile work as they do in most Web search engines, that is, based on Boolean logic -- with some powerful enhancements. For example, you can search for two words withing a certain proximity to each other, what field they must be in, and their exact case. Or if one word should be judged more important than the other, so documents containing the that word appear closer to the top of search results. Using wildcards, you can also search for word fragments.
Operator formats are explained below which you use in any view's search bar.
Operators must be in all uppercase in order to apply properly. If you enter an operator in lowercase (such as, accrue or exactcase), MasterFile assumes it is being used as an actual term instead of as an operator.
The exceptions to this rule are the common word operators AND, OR, and NOT, which do not have to be in uppercase. Note, however, that NOT is not an operator, so if the word NOT, in any case, precedes a word without a needed operator, AND will be added, for instance (not ibm) means (and not ibm). The - (minus sign) is the operator that has the meaning "not".
An asterisk and question mark are the two wildcards; their usage is explained below.
Operators are reserved words. If you want to search for an operator as you would normal text, for example in a phrase such as "Gene and Joan", you must put the phrase in quotes.
||Description and examples
|Requires that the field before it must contain the text after it. There should be spaces between 'CONTAINS' and words surrounding it.
[Projectname] CONTAINS top secret
Finds documents whose Projectname field contains the words 'top secret.'
||Requires that the field before it must be non-blank. There should be spaces between 'IS PRESENT' and words surrounding it. This operator can be used to find all documents that do (or do not) contain a value in a particular field.
[Subject] IS PRESENT
Finds documents whose Subject field is non-blank.
[fieldname] (use square brackets)
|Means 'search this field.' You must specify the field to search by using its field name.
Each of the following are equivalent ways to find documents whose Projectname field contains the phrase top secret:
FIELD Projectname CONTAINS top secret
field Projectname CONTAINS top secret
[Projectname] CONTAINS top secret
|( ) [parentheses]
||Determines the order in which sections of your query are processed. A part of the query enclosed in parentheses will be processed before parts outside the parentheses.
(FIELD Projectname CONTAINS top secret OR FIELD Title CONTAINS tuna) AND (Field body CONTAINS cat OR Field revdate > 01/01/2004)
Return documents whose Projectname field contains the words 'top secret' or whose title field contains the word 'tuna'; and either the body field contains the word cat or the revdate field contains a date greater than 01/01/2004.
|Finds documents containing all the conditions or words linked by AND.
cat AND dog AND fish
Finds documents containing all three of these words
|Finds documents containing either of the conditions or words and returns them ranked by number of appearances in the document.
cat OR dog OR fish
Finds documents containing at least one of these words.
Note: ACCRUE works slightly better than OR when sorting results by relevance.
|Excludes documents containing the term that appears after the operator.
You can put NOT between words:
|" " (double quotes)
||Requires that only documents containing the exact phrase are returned. Placing double quotes around operators (like AND, OR, CONTAINS etc.) allows them to be read as normal words.
"rock and roll"
Finds documents containing the phrase rock and roll.
|Finds documents in which the words surrounding PARAGRAPH are in the same paragraph, and ranks them by how close they are.
car PARAGRAPH wheels
Finds documents in which 'car' and 'wheels' appear in the same paragraph and ranks them by how close the words are within the paragraph.
|Finds documents in which the words surrounding SENTENCE are in the same sentence, and ranks them by how close they are.
car SENTENCE wheels
Finds documents in which 'car' and 'wheels' appear in the same sentence and ranks them by how close the words are within the sentence.
||A wildcard that can represent any single letter. It does not work with dates or numbers.
Finds documents containing bone, cone, done, gone (and any other four-letter words that end with 'one')
Finds documents containing stack, clock, stick, truck; rack, rick, rock
||A wildcard that can represent any extension of letters. It does not work with dates or numbers.
Finds documents containing bone, cone, clone, crone, done, drone, gone, telephone (and any other words of any length that end with 'one').
Finds documents containing bone, cone, clone, lonely, phoned, stoned, pardoned.
|Gives importance, or weight, to search words. You can use any value from 0 through 65537 to assign weight.
TERMWEIGHT 25 photo or TERMWEIGHT 75 audio or TERMWEIGHT 50 video
Finds documents containing at least one of the words. 'Audio' is most important, 'video' is next, and 'photo' is least important. Results are ranked accordingly. You need an AND or OR between the first TERMWEIGHT and subsequent ones.
|Search for the exact case of the word specified after the operator.
Finds documents containing "Apple", but not "APPLE" or "apple".
< (less than)
> (greater than)
<= (less than or equal)
>= (greater than or equal)
|Search for numbers or dates in numeric or date fields only.
Finds documents whose 'date1' field contains any date before 12/25/98.
||Finds documents with the hyphenated word pair.
Finds documents containing "full-text."
You can limit searches to field names; in this case, use the field's actual internal name which is shown at the bottom of a field's pop-up help (AF_Description_t below).
[AF_description_t] CONTAINS Chemical
Finds profiles whose Fact description field contains "chemical".
Use the fieldname _CreationDate to find documents by the date they were created. For example,
finds documents created on January 5, 2001.
Use the fieldname _RevisionDate to find documents by the day they were last modified. For example,
finds documents that were last modified on January 5, 2001.
These fields are contained in a document's header, not the document itself, and are therefore not in the list of field names found in a profile's properties dialog box. Note that these are not a MasterFile profile's date either; that is a document date and the above two dates are the date the document was created in the database or the date the profile was subsequently modified by a user.