Xbasic
TEXTSEARCHSCORE Function
Syntax
Percentage as N = TEXTSEARCHSCORE(C string,C search_pattern)
Arguments
- string
The character string to find.
- search_pattern
The character string to examine for occurrences of Find_String.
Description
Returns a count of the number of ways a pattern matched a string (0 for none, 1 for one condition matched, 2 for two conditions matched etc.
Discussion
Returns the number of phrases in string found in search_pattern as a percentage. Search is case insensitive.
Example
textsearchscore("now is the time for all good men", "time AND bad") -> 0, since one was matched, but not both . textsearchscore("now is the time for all good men", "time OR bad") -> .5, since 50%, were matched textsearchscore("now is the time for all good men", "time AND good") -> 1, since both, or 100%, were matched textsearchscore("now is the time for all good men", "time OR good") -> 1, since both were matched
See Also