2.2.1.19 QUERYMETADATA

The QUERYMETADATA structure contains a serialized representation of the metadata about a search query. This structure is returned in the vValue field of the CPMFetchValueOut message.


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

vType

Reserved0

vLen

NoiseWords (variable)

...

SpellingSuggestion (variable)

...

QueryTerms (variable)

...

TermIds (variable)

...

EstimatedCount

RestrictionCount

Restrictions (variable)

...

vType (2 bytes): A 16-bit reserved field describing the type of the property. vType MUST be set to VT_BLOB, as specified in section 2.2.1.1.

Reserved0 (2 bytes): A reserved 16-bit field. This field MUST be set to "0x00".

vLen (4 bytes): A 32-bit field specifying the total length in bytes of the remaining fields of the structure (excluding the vType, Reserved0, and vLen fields).

NoiseWords (variable): A CBaseStorageVariant containing terms which were treated as ignored words during query execution. The vType field of this structure MUST be set to VT_VECTOR | VT_LPWSTR ("0x101F"). The vValue field MUST contain an array of zero or more query terms which were treated as ignored words by the query. For information about serialization for vValue, see section 2.2.1.1.

SpellingSuggestion (variable): A CBaseStorageVariant containing terms that have been determined by the server to be alternate spelling of terms specified in the query<4>. The vType field of this structure MUST be set to VT_LPWSTR ("0x001F"). The vValue field MUST contain space-delimited spelling suggestions. If all spelling suggestions are the same as the original terms, the vValue MUST contain a null-terminated empty VT_LPWSTR. For information about serialization for vValue, see section 2.2.1.1.

QueryTerms (variable): A CBaseStorageVariant containing terms from the query. The vType field of this structure MUST be set to VT_VECTOR | VT_LPWSTR ("0x101F"). The vValue field MUST contain an array of zero or more query terms. For information about serialization for vValue, see section 2.2.1.1.

TermIds (variable): A CBaseStorageVariant containing term identifiers from the search query. The vType field of the TermIds field MUST be set to VECTOR | VT_UI4 ("0x1013"), and the vVectorElements field of the TermIds structure MUST be set to the same value as the vVectorElements field of the QueryTerms structure. The vVectorData field SHOULD contain term identifier values that are specific to the protocol server implementation. The protocol client MUST ignore the values in vVectorData. For information about serialization for vValue, see section 2.2.1.1.

EstimatedCount (4 bytes): A 32-bit field containing the estimated number of total results, regardless of the number of rows requested by the protocol client.

RestrictionCount (4 bytes): A 32-bit field containing the number of restrictions that follow in the Restrictions field. This value MUST be set to "1".

Restrictions (variable): A sequence of serializations of CRestrictions, as specified in section 2.2.1.9. There MUST be as many serializations of CRestriction as indicated in the RestrictionCount field. These MUST be the restrictions that the protocol server used to generate the row set containing the results of the query. This set of restrictions can be the same as the restrictions specified in the CPMCreateQueryIn message, as specified in section 2.2.3.3, but it can also be different if the protocol server modified the restriction (1) before executing the query.