2.2.1.11 CVectorRestriction

The CVectorRestriction structure contains a weighted OR operation over restriction nodes. Vector restrictions represent queries using the full text vector space model of ranking (see [SALTON] for details). In addition to the OR operation, they also compute a rank based on the ranking algorithm.


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

_pres (variable)

...

_padding (variable)

...

_ulRankMethod

_pres (variable): A CNodeRestriction command tree upon which a ranked OR operation is to be performed.

_padding (variable): This field MUST be 0 to 3 bytes in length. The length of this field MUST be such that the following field begins at an offset that is a multiple of 4 bytes from the beginning of the message that contains this structure. If this field is present (that is, length is nonzero), the value it contains is arbitrary. The content of this field MUST be ignored by the receiver.

_ulRankMethod (4 bytes): A 32-bit unsigned integer specifying a ranking algorithm. MUST be set to one of the following values.

Value

Meaning

VECTOR_RANK_MIN

0x00000000

Use the minimum algorithm, as specified in [SALTON].

VECTOR_RANK_MAX

0x00000001

Use the maximum algorithm, as specified in [SALTON].

VECTOR_RANK_INNER

0x00000002

Use the inner product algorithm, as specified in [SALTON].

VECTOR_RANK_DICE

0x00000003

Use the Dice coefficient algorithm, as specified in [SALTON].

VECTOR_RANK_JACCARD

0x00000004

Use the Jaccard coefficient algorithm, as specified in [SALTON].