class %Library.TextStreamInterface
extends %Library.CacheStreamEmbedded
parameter LANGUAGECLASS = "%Text.English";
The LANGUAGECLASS parameter specifies the fully qualified name of the language
implementation class. Optionally, he LANGUAGECLASS may be set to the name of a global
that indirectly defines the language class name. If a global name is specified, then the global must be
defined and available at index build time and at SQL query execution time.
parameter SIMILARITYINDEX;
Specify the SIMILARITYINDEX parameter when you intend to use
the %SIMILARITY SQL operator to rank query results by relevance.
The SIMILARITYINDEX parameter specifies the name of an index on the current
property that has the structure expected by the SimilarityIdx class method of the class specified in
the LANGUAGECLASS parameter. The SimilarityIdx class method in the %Text.Text class requires the index
global to have the structure: ^textIndexGlobal([constantSubscripts,]key,ID) = value. An index with this
structure can be created by compiling an index specification such as:
PROPERTY myDocument As User.TextStream (LANGUAGECLASS = "%Text.English", SIMILARITYINDEX = "myIndex");
INDEX myIndex ON myDocument(KEYS) DATA [ myDocument(VALUES) ];
The SimilarityIdx method of the %Text.Text class requires the index specified in the SIMILARITYINDEX parameter
to have exactly this structure. The index may not be a bitmap index, additional subscripts or data values
may not be added to the Index specification, and the index must inherit the collation of the property.