Поделиться через


IixssoQuery::DefineColumn method

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

Defines a new friendly name for a column to be included in queries. By defining an alias for an existing property, you create a shorthand term to refer to it.

Syntax

HRESULT DefineColumn(
  [in] BSTR pwszColDefinition
);

Parameters

pwszColDefinition [in]

A column definition string. The syntax is as follows:

fname [ ( type ) ] = propset-id [ prop-id | " prop-name " ]

The components are defined as follows:

fname

The friendly name given to the property.

type

The DBTYPE of the column (used in query restrictions).

propset-id

Globally unique identifier (GUID) of the property set ID for the column.

prop-id

The numeric ID of the property ID for the column.

prop-name

The property name for the column.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The fname can mask some previously defined or predefined column name. Also, DefineColumn can define an alternative friendly name (an alias) for some existing column.

If the DefaultColumnFile registry value is set, the file named in the setting is read for a set of column definitions available for every query. Otherwise, the column names in List of Property Names become the default column settings.

Examples

strNewColumn = """dc.source.type.category""(dbtype_wstr|dbtype_byref) = CF2EAF90-9311-11CF-BF8C-0020AFE50508 dc.source.type.category"
objQuery.DefineColumn(strNewColumn)
objQuery.Columns = "path, ""dc.source.type.category"""

Requirements

Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008 R2
DLL
Ixsso.dll

See also

IixssoQuery