Examples: UpdateFTIndex method
- This script updates the full-text index of the current database if the database has been modified since the time the index was updated.
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
If ( db.LastModified > db.LastFTIndexed ) Then
Call db.UpdateFTIndex( False )
End If
- This script checks whether INDEXME.NSF has a full-text index. If not, it asks the user if the user wants to create an index. If the user selects Yes, the script creates an index.
This script must include the file LSCONST.LSS.
Dim db As New NotesDatabase( "", "indexme.nsf" )
Dim collection As NotesDocumentCollection
Dim answer As Integer
If Not ( db.IsFTIndexed ) Then
answer = Messagebox _
( "Do you want to create an index?", MB_YESNO )
If ( answer = IDYES ) Then
Call db.UpdateFTIndex( True )
End If
End If
Set collection = db.FTSearch( "blue", 0 )
'...do something with collection...