Second Signal Logo

ftsyntax


** Extracted from the Lotus Knowledge Base **

Domino R5 Supported Syntax for Full Text Searching

The following chart demonstrates the supported syntax for Domino 5.x full text searching:

Full Text Search Syntax Chart

Operator/
Expression
DB SearchDomain Search (both simple and advanced)Web SearchExampleMeaningComments
ACCRUE | "," Yes Yes No/Yes Cat, Dog , Fish Weighted ORORing is always weighted in V5
AND | "&" Yes Yes Yes Cat AND Dog Boolean AND
"&" doesn't work on web
OR | "|" Yes Yes Yes/No Cat OR Dog Boolean OR
always weighted
NOT, "!" Yes Yes Yes/NoCat AND NOT DogBoolean NOT (Exclusion)Need AND/OR before NOT, "!" doesn't work on WEB
"-" No No Yes Cat -Dog Exclusion
"+" No No Yes+CAT +DOG" Requirement
PARAGRAPH Yes YesNo(2) Cat PARAGRAPH Dog Paragraph Proximity
SENTENCE Yes YesNo(2) Cat SENTENCE Dog Sentence Proximity
TERMWEIGHT Yes Yes'No(2)TERMWEIGHT 80 Cat AND TERMWEIGHT 30 DogWeighted SearchNeed AND/OR before subsequent TERMWEIGHTs
FIELD | "[" "]" Yes Limited(1) 'No(2) FIELD from = "Frank Kashner"Field searchDomain search only common fields
EXACTCASE Yes Yes 'No(2) EXACTCASE "dog" case sensitive searchDoesn't work with field search
CONTAINS | "=" Yes Yes 'No(2) FIELD body CONTAINS Cat Regular full text searchNeeds FIELD context
">" | ">=" | "<" | "<=" | "=" Yes YesNo(2) FIELD Total > 25Numeric field search operatorswork on date fields too, but not text fields, unpredictable web support
"*" | "?"YesYesYesDog* OR Cat? WildcardDoes not work with numeric search
" Yes Yes Yes"This is a short phrase" Text phrase search
Note the following:
    1. Field names must be part of documents in different databases.
    2. The key words and operators are not flagged as syntax errors, they are treated as lookup literals.
    3. Though current functionality is questionable, reserve words preserved against future functionality.

ADVANCED SEARCH SYNTAX
Precedence rules. Rightmost always takes precedence always, so reversing the order changes results.

Operator/Expression SyntaxExampleAction
ACCRUE with Proximity Cat ACCRUE Dog Near WaterFind documents that contain both "Cat and Dog, then find Water near Dog
ANDs with ORs and NOTs Cat AND ! Dog OR Fish Find documents that contain "Cat" but not "Dog" or contain "Fish"
Field search with Case SensitiveFIELD body CONTAINS EXACTCASE Dog OR EXACTCASE fiSH Find documents whose body field contains a case-sensitive "Dog" or contain anywhere a case-sensitive "fiSH"
Weighted search and ORsTERMWEIGHT 20 Dog OR TERMWEIGHT "Fish" OR TERMWEIGHT 80 CatFind documents with either "Dog" or "Fish" or "Cat", rank them by the sum of their termweights
ORs and NOTsDog OR ! FishFind documents that have "Dog" or don't have "Fish", rank those highest for which both conditions are true


Note that the NEAR proximity parameter is not supported with GTR in R5:

    R4.x full-text options no longer supported in R5
    • Thesaurus
    • The "Stop Word" file option is no longer used when creating a full-text index
    • The word proximity/breaking operator "NEAR"

Searching for Header Information (Search by Date Created or Modified)

The "Add Search" button that appears beside the full-text-search entry area in agents allows you to search for documents "By date created" and "By date modified". If you need to write such queries yourself (for instance, to use with the FTSearch method), you can use the following special item names:
Header FieldItem name
CREATION DATE_CreationDate
REVISION DATE_RevisionDate
DB TITLE (domain index only)_Title
DB CATEGORIES (domain index only)DbCategories
NOTE TITLE_Note_Title
AUTHOR_Note_Author
For example, to find all documents created before 5 January 2000, you may use either of the following queries:

    [_CreationDate] < 01/05/2000

    FIELD _CreationDate < 01/05/2000


There are no such field names stored in the document; the dates actually come from the document's header, not from fields. So you can use these names with any document, even though they do not appear among the field items in the Document Properties dialog.

There is no syntax corresponding to the search builder functions to find documents based on the difference from today's date (e.g. "is in the last n days"). Your agent will need to plug in actual dates at runtime (which it can calculate by adjusting today's date). Date formats vary based on user settings, so you must use a format that matches the workstation or server that will evaluate the query.