FTSearchScore (NotesViewEntry - JavaScript)

Read-only. The full-text search score of a view entry, if it was retrieved as part of a full-text search.

Defined in

NotesViewEntry

Syntax

getFTSearchScore() : int

Usage

The score is determined by the number of target words that are found in the entry, the term weights assigned to the target words, and any proximity operators in the search query. If the entries are not retrieved as part of a full-text search, returns 0. If the entry is retrieved using an FTSearch method on a database without a full-text index, returns an unpredictable number.

Examples

This computed field returns information on entries found from a full-text search, including their search scores.
database.updateFTIndex(true);
var v:NotesView = database.getView("By category");
var vec:NotesViewEntryCollection = v.getAllEntries();
vec.FTSearch(requestScope.query);
var entry:NotesViewEntry = vec.getFirstEntry();
while (entry != null) {
	requestScope.status += "\n" +
	entry.getColumnValues().elementAt(1).toString() + " (" +
	entry.getFTSearchScore().toFixed() + ")";
	var tmpentry:NotesViewEntry = vec.getNextEntry(entry);
	entry.recycle();
	entry = tmpentry;
}