FTSearchSorted (NotesView - LotusScript®)

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 in sorted order.

Defined in

NotesView

Syntax

numDocs& = = notesView .FTSearchSorted( query [maxDocs%] [column] [ascending] [exact] [variants] [fuzzy] )

Parameters

Parameter Description
query Variant. The full-text query or the intersection of multiple queries. See below for the query syntax.
maxdocs% Integer. Optional. The maximum number of documents you want returned from the search. If you want to receive all documents that match the query, specify 0. Defaults to 0.
column Variant. Optional. The name or 0-based index of a sorted column. A specification of NotesView.VIEW_FTSS_RELEVANCE_ORDER (512) returns results in relevance order while honoring the use of the extended flags for exact case, variants, and fuzzy search.
ascending Boolean. Optional. Sorts column data in ascending order if true, descending order if false. Defaults to true. Ignored if NotesView.VIEW_FTSS_RELEVANCE_ORDER is in effect. The availability of a column to be sorted in ascending or descending order is determined by "Click on column header to sort" on the Sorting tab of the column properties. The relevant options are Ascending, Descending, and Both. Trying to sort a column in an unsupported direction throws an NOTES_ERR_INVALIDVIEWRESORT exception.
exact Boolean. Optional. Applies the EXACTCASE filter to the search if true. Defaults to false.
variants Boolean. Optional. Returns word variants in the search results if true. Defaults to false.
fuzzy Boolean. Optional. Returns misspelled words in the search results if true. Defaults to false.

Return value

numDocs&

The number of documents in the view after the search. Each of these documents matches the query.

Usage

After calling this method, you can use the regular NotesView methods to navigate the result, which is a subset of the documents in the view. When passing in just the query argument, the documents in the subset are sorted using the default collation of 0. To retrieve the documents with a different collation pass in the name or index of the column you wish to sort on along with any optional search flags. The method 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 will issue an error. 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 "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 Lotus Notes.

The query is of type Variant which can either be a single String or a Array of String which will be combined together with an AND during the search.

Language cross-reference

FTSearchSorted method in Java View class

FTSearchSorted method in JavaScript NotesView class

ViewShowOnlySearchResults @command in formula language