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

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

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

vLen (4 bytes): A 32-bit field. MUST be set to the length in bytes of the NoiseWords, SpellingSuggestion, QueryTerms, TermIds and EstimatedCount fields.

NoiseWords (variable): A CBaseStorageVariant containing terms which were treated as noise 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 0 or more query terms which were treated as noise words by the query. See serialization for vValue in section 2.2.1.1.

SpellingSuggestion (variable): A CBaseStorageVariant containing terms which have been determined by the server as being 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 keywords and any keywords which are spelling suggestions MUST be prefixed with "<suggestion>" and post fixed with "</suggestion>". If there are no spelling suggestions then the vValue MUST contain a null-terminated empty VT_LPWSTR. See serialization for vValue in 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 0 or more query terms. See serialization for vValue in 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<5>.

See serialization for vValue in 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.