FTIndexFrequency (NotesDatabase - JavaScript)

Read-write. Update frequency of a database's full-text index.

Defined in

NotesDatabase

Syntax

getFTIndexFrequency() : int

setFTIndexFrequency(frequency:int) : void

Legal value

  • 1 FTINDEX_DAILY
  • 2 FTINDEX_SCHEDULED
  • 3 FTINDEX_HOURLY
  • 4 FTINDEX_IMMEDIATE

Usage

This property applies only to databases on servers.

The database must have a full-text index.

The database must be open to use this property.

Examples

This button toggles the frequency of updates to a full-text index.
if (database.isFTIndexed()) {
	if (database.getFTIndexFrequency() == NotesDatabase.FTINDEX_DAILY) {
		database.setFTIndexFrequency(NotesDatabase.FTINDEX_HOURLY);
		requestScope.status = "Index frequency set to hourly";
	} else if (database.getFTIndexFrequency() == NotesDatabase.FTINDEX_HOURLY) {
		database.setFTIndexFrequency(NotesDatabase.FTINDEX_IMMEDIATE);
		requestScope.status = "Index frequency set to immediate";
	} else if (database.getFTIndexFrequency() == NotesDatabase.FTINDEX_IMMEDIATE) {
		database.setFTIndexFrequency(NotesDatabase.FTINDEX_SCHEDULED);
		requestScope.status = "Index frequency set to scheduled";
	} else {
		database.setFTIndexFrequency(NotesDatabase.FTINDEX_DAILY);
		requestScope.status = "Index frequency set to daily";
	}
} else {
        requestScope.status = "Database not full-text indexed";
}