2.2.12.4 SET Statement

The SET statement is a legacy statement and SHOULD NOT be used by the protocol client. However, the protocol server MUST recognize it in two different syntaxes. One is as follows:

 …SET RANKMETHOD method…

In this form, the default method for calculating the value of the Rank property for the ISABOUT expression MUST be set to the method given in the SET statement. The SET statement only sets the default; if the ISABOUT expression specifies a different method for calculating the value of the Rank property, it MUST take precedence over the one specified in the SET statement. If there are multiple SET statements, the rightmost one MUST take precedence. If there is no SET statement that specified a method, the JACCARD COEFFICIENT method MUST be used as a default.

 set-statement      =      "SET" 1*ws "RANKMETHOD" 1*ws rankmethod

The form of the second syntax of the SET statement is as follows:

 …SET PROPERTYNAME guid PROPID id AS name TYPE type…

It is a legacy statement that MUST have no effect on the processing of the rest of the search query, but it MUST be recognized and not be rejected by the protocol server as a malformed search query. The guid component of the syntax MUST be a GUID. The id component of the syntax MUST be a positive integer, either specified in decimal or in hexadecimal. The name component MUST be a valid identifier. The form of the optional TYPE clause is as follows:

 …TYPE type…

where the type component is one of  the following:

  • DBTYPE_I2

  • DBTYPE_I4

  • DBTYPE_R4

  • DBTYPE_R8

  • DBTYPE_CY

  • DBTYPE_DATE

  • DBTYPE_BSTR

  • DBTYPE_BOOL

  • DBTYPE_STR

  • DBTYPE_WSTR

     set-statement      =/      "SET" 1*ws "PROPERTYNAME" 1*ws guid 1*"PROPID" 1*ws property-id 1*ws "AS" 1*ws identifier [1*ws type-clause]
     guid      =      8hex-digit "-" 4hex-digit "-" 4hex-digit "-" 4hex-digit "-" 12hex-digit
     property-id      =      positive-decimal / positive-hex
     type-clause      =      "TYPE" 1*ws dbtype
     dbtype      =      "DBTYPE_I2" / "DBTYPE_I4" / "DBTYPE_R4" / "DBTYPE_R8" / "DBTYPE_CY" / "DBTYPE_DATE" / "DBTYPE_BSTR" / "DBTYPE_BOOL" / "DBTYPE_STR" / "DBTYPE_WSTR"