2.2.1.17 CRestriction

The CRestriction structure contains a restriction node in a query command tree.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

_ulType

Weight

Restriction (variable)

...

_ulType (4 bytes): A 32-bit unsigned integer indicating the restriction type used for the command tree node. The type determines what is found in the Restriction field of the structure as described below. MUST be set to one of the following values.

Value

Meaning

RTNone

0x00000000

The node contains an empty Restriction (no value). It represents a node that would evaluate to no results. If under an RTNot node, the RTNot node would evaluate to the entire set of documents. If under an RTAnd node, the RTAnd node would also evaluate to no results. If under an RTOr node, the RTOr node would evaluate to whatever it would have evaluated to if the RTNone node was not there.

RTAnd

0x00000001

The node contains a CNodeRestriction on which a logical AND operation is to be performed. The CNodeRestriction contains the other restrictions that this operation is performed on.

RTOr

0x00000002

The node contains a CNodeRestriction on which a logical OR (disjunction) operation is to be performed. The CNodeRestriction contains the other restrictions that this operation is performed on.

RTNot

0x00000003

The node contains a CRestriction on which a NOT operation is to be performed.

RTContent

0x00000004

The node contains a CContentRestriction.

RTProperty

0x00000005

The node contains a CPropertyRestriction.

RTProximity

0x00000006

The node contains a CNodeRestriction with an array of CContentRestriction structures. Any other kind of restriction is undefined. The restriction requires the words or phrases found in the CContentRestriction structures to be within the GSS defined range in order to be a match. The WSS implementation computes a rank based on how far apart the words or phrases are. Implementations of the GSS can choose to do the same.

RTVector

0x00000007

The node contains a CVectorRestriction.

RTNatLanguage

0x00000008

The node contains a CNatLanguageRestriction.

RTScope

0x00000009

The node contains a CScopeRestriction.

RTReuseWhere

0x00000011

The node contains a CReuseWhere restriction.

RTInternalProp

0x00FFFFFA

The node contains a CInternalPropertyRestriction.

RTPhrase

0x00FFFFFD

The node contains a CNodeRestriction on which a phrase match is to be performed. The restrictions in the CNodeRestriction can only be a RTContent node. Otherwise, an error MUST be returned.

RTCoerce_Add

0x0000000A

The node contains a CCoercionRestriction structure with operation ADD, as specified in section 2.2.1.12.

RTCoerce_Multiply

0x0000000B

The node contains a CCoercionRestriction with structure operation MULTIPLY, as specified in section 2.2.1.12.

RTCoerce_Absolute

0x0000000C

The node contains a CCoercionRestriction structure with operation ABSOLUTE, as specified in section 2.2.1.12.

RTProb

0x0000000D

The node contains a CProbRestriction structure.

RTFeedback

0x0000000E

The node contains a CFeedbackRestriction structure.

RTReldoc

0x0000000F

The node contains a CRelDocRestriction structure.

Weight (4 bytes): A 32-bit unsigned integer representing the weight of the node. Weight indicates the node's importance relative to other nodes in the query command tree. This weight is used to calculate the rank of each node, although the exact effect of the weight is undefined. The guidance is that results from higher-weighted nodes usually return a higher rank than results from nodes that are the same but weighted lower. Implementers of the GSS can choose the exact algorithm.

Restriction (variable): The restriction type for the command tree node. The syntax MUST be as indicated by the _ulType field.