Preparing a fulltext index
You need to have or create a fulltext index before you can execute a query.
Note:
Domino API does not support the creation of fulltext indices on remote databases. The following methods can only be used with local databases.
If a AbtLnDatabase is not indexed yet, there are two ways to create a fulltext index:
1. Send the createIndex message to an AbtLnDatabase instance
2. Send the createIndexWithOptions: message to an AbtLnDatabase instance and supply an AbtLnFTIndexOptions object to specify indexing details.
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:
Do not search encrypted fields
Do not care about case
Do allow search for sentences and paragraphs
 
| 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"
Note:
Building a fulltext index can take some time. On large databases the creation can take several minutes. You should consider executing the createIndex method in a separate process.
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.
Last modified date: 01/29/2015