LOTUSSCRIPT/COM/OLE CLASSES


FTSearch method
Example

Conducts a full-text search on all documents in a view and filters the view so it represents only those documents that match the full-text query. This method does not find word variants.

Defined in

NotesView

Syntax

numDocs& = notesView.FTSearch( query$, maxDocs% )

Parameters

query$


maxDocs%
Return value

numDocs&


Usage

After calling FTSearch, you can use the regular NotesView methods to navigate the result, which is a subset of the documents in the view. If the database is not full-text indexed, the documents in the subset are in the same order as they are in the original view. However, if the database is full-text indexed, the documents in the subset are sorted into descending order of relevance. GetFirstDocument returns the first document in the subset, GetLastDocument returns the last document, and so on.

Use the Clear method to clear the full-text search filtering. The NotesView methods now navigate to the full set of documents in the view.

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

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 "Finding documents in a database" in Lotus Notes Help.

Language cross-reference

FTSearch method in Java View class

ViewShowOnlySearchResults @command in formula language

Example
See Also