The SET statement maps column names to property IDs and GUIDs (SET PROPERTYNAME) or selects a ranking method for content searches (SET RANKMETHOD).
You typically use a series of SET statements to define your friendly names for columns, prior to executing subsequent SELECT statements.
The type of aliasing done with SET is similar to the [Names] Section of the Index Server Internet Data Query (.idq) files, where you can define "friendly" column names for use in queries.
This statement associates a property set with a friendly name (column alias) and a data type. The property is identified by a GUID and a property ID, which can be either a number or a string. The SET PROPERTYNAME definitions last for the duration of an active connection.
Note Once a property name has been used in a view, it cannot be redefined.
SET PROPERTYNAME 'GUID ' PROPID { 'Property_Name' | Property_ID } AS Friendly_Name [ TYPE dbtype ]
GUID | Specifies the Globally Unique Identifier. The GUID must be written in the following format, enclosed in single quotes:
|
Property_Name | Specifies the name of the property within the ActiveX property namespace. |
Property_ID | Specifies the property ID as a decimal or hexadecimal number. If you use a hexadecimal number, precede the number with "0x". |
dbtype | Specifies the type of data being used. The dbtype parameter is optional for Index Server. You need to specify the parameter in situations when the data type is not a string. This is the default. For example, in the following piece of code, Index Server needs to know whether to interpret the value as a string or a date:
WHERE MyProperty = '1996-10-10' If the data type is not provided, DBTYPE_WSTR (Unicode string) is assumed. See the Names section of the Internet Data Query Files chapter for further information. |
Friendly_Name | Specifies the friendly name (column alias). It is possible to set different (multiple) friendly names to the same property. For example, the friendly name "author" may be also known as "auteur" for a mixed community where both English and French are spoken. However, it is important to note that these two friendly names cannot be used in the same query. |
SET PROPERTYNAME 'D5CDD502-2E9C-101B-9397-08002B2CF9AE' PROPID 0xE AS DocManager
SET RANKMETHOD sets the ranking method you want to use before issuing queries. The SET RANKMETHOD definition lasts for the duration of the session with Index Server. Subsequent queries will continue using the method you set until you change it. If the specified method is not supported, the default (JACCARD COEFFICIENT) is used instead.
SET RANKMETHOD Method
Method | Specifies the ranking algorithm to use to evaluate the rank of a vector query match for content searching. The method can be one of the following:
|
SET RANKMETHOD DICE COEFFICIENT