You need to have or create a fulltext index before you can execute a query.
If a AbtLnDatabase is not indexed yet, there are two ways to create a fulltext index:
The class AbtLnFTIndexOptions allows you to set up the search index like you would do it using the Notes client software. To learn about indexing options, see your Domino documentation. Here is a code fragment showing how to create a fulltext search index on a database with the following options:
| connection database ftOptions | "Start runtime system" AbtLnEnvironment startUp. "Create a connection to local databases" connection := AbtLnConnection local. "Open one of the sample databases provided with the feature" database := connection openDatabase: 'VASAMPLE\VASAMPLE.NSF'. "Find out if the database is indexed" database isIndexed ifFalse: [ "If the database is not indexed, create an index using the special indexing options" ftOptions := AbtLnFTIndexOptions new disableEncryptedFields; disableCaseSensitve; enableSentenceAndParagraphs. database createIndexWithOptions: ftOptions. ]. "...... application code follows"
As a fulltext index is a static structure, it can be out of date. Adding or deleting documents can force you to re-index a databases for proper fulltext search results. Use the updateIndex method with your databases to restructure a previously existing index.