getFTSearchScore (NotesXspViewEntry - JavaScript™)
Gets the full-text search score of a view entry retrieved as part of a full-text search.
Defined in
NotesXspViewEntry (JavaScript)Syntax
getFTSearchScore() : int
Return value | Description |
---|---|
int |
The search score, or 0 if the entries are not retrieved as part of a full-text search. |
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 entry is retrieved using anFTSearch
method
on a database without a full-text index, returns an unpredictable
number.Examples
This value script for a Computed Field is embedded in a Data Table control with a Domino® view data source whose collection name isrowdata
. The script gets the full-text search
score for each view column entry.try {
if (database.isFTIndexed()) {
return rowdata.getFTSearchScore().toString();
} else {
database.createFTIndex(0, false);
requestScope.status = "FT index created";
return rowdata.getFTSearchScore().toString();
}
} catch (e) {
return e.toString()
}