Xbasic

KEYWORDS Function

Syntax

Sorted_List as C = KEYWORDS(C string)

Arguments

string

A string expression containing words separated by spaces.

Description

Returns a sorted list of all unique words in a string, when used in with index, will generate a keyword index.

Discussion

KEYWORDS() returns a sorted list of all of the unique words in string. This function is typically used to build an index for full text searching. When you build full text indexes on memo fields and other long character fields, Alpha Anywhere can find a word anywhere within long memos and character fields very quickly, using Lightning Query Optimization. Case sensitive.

Example

? keywords("now is the time for all Good Men")
= "Good Men all for is now the time"
? keywords("now is the time for for for all Good Men")
= "Good Men all for is now the time"' because only unique words are returned.
? keywords("a aa aaa aA aAA aAa AAA AA Aa AAa")
= "AA AAA AAa Aa a aA aAA aAa aa aaa"

Limitations

The string argument is case sensitive.

See Also