FTSearch (NotesDocumentCollection - LotusScript®)

Conducts a full-text search of all the documents in a Notes® document collection, and reduces the collection to those documents that match.

Defined in

NotesDocumentCollection

Syntax

Call notesDocumentCollection .FTSearch( query$ , maxDocs% )

Parameters

query$

String. The full-text query. See the following for the syntax.

maxDocs%

Integer. The maximum number of documents you want returned from the query. Set this parameter to 0 to receive all matching documents.

Usage

This method moves the current pointer to the first document in the collection.

If the collection is empty, FTSearch.Count is 0.

The collection of documents that match the full-text query are sorted by relevance with highest relevance first. You can access the relevance score of each document in the collection using the FTSearchScore property in NotesDocument.

If the database is not full-text indexed, this method works, but less efficiently. To test for an index, use the IsFTIndexed property in NotesDatabase. To create an index on a local database, use the UpdateFTIndex method.

This method searches all of the documents in a document collection. To search all of the documents in a database, use the FTSearch method in NotesDatabase. To search only documents found in a particular view, use the FTSearch method in NotesView or FTSearch method in NotesViewEntryCollection.

Query syntax

To search for a word or phrase, enter the word or phrase as is, except that search keywords must be enclosed in quotes. Remember to escape quotes if you are inside a literal.

Wildcards, operators, and other syntax are permitted. For the complete syntax rules, see "Refining a search query using operators" in Notes® Help. Search for "query syntax" in the Domino® Designer Eclipse help system or information center (for example, http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/index.jsp), both of which include Notes®.

Example