Share via


ContentList.BuildIndex Method (PIA)

Use this method to build an index for a specific column in a ContentList object.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop.Caching
…
Public Sub BuildIndex(vCol As Object)

[C#]

using Microsoft.CommerceServer.Interop.Caching;
…
public void BuildIndex(object vCol);

Parameters

[Visual Basic .NET]

  • vCol
    An Object that identifies the column for which the index will be built. The column is identified by either a number representing a column position, starting at zero (0), or a string containing a column name.

[C#]

  • vCol
    An object that identifies the column for which the index will be built. The column is identified by either a number representing a column position, starting at zero (0), or a string containing a column name.

Exceptions

This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.

The following standard COM error value has a particular meaning in the context of this method.

  • S_FALSE
    An index already exists on the column*.*

Remarks

An index can be built on any read-only, non-private column that is of type string, integer, or array of strings or integers (CLCOL_READONLY and not CLCOL_PRIVATE). Also, only columns of type CLCOL_I2, CLCOL_I4, CLCOL_STRING, and CLCOL_VARIANTARRAY can be indexed. The non-private restriction means that the column will actually reside in the corresponding ContentListFactory object.

If a search is conducted on a column for which no index yet exists, the index is automatically created. This means that, although you are never required to call the BuildIndex method, you may want to incur the cost of creating the index at a known time for performance sake.

This method is functionally identical to the one of the same name in the ContentListFactory object.

[Visual Basic .NET]

Example

myDataContainer.BuildIndex(10)

Requirements

Namespace: Microsoft.CommerceServer.Interop.Caching

Platforms: Windows 2000, Windows Server 2003

Assembly: cachecomplib (in cachecomplib.dll)

See Also

ContentList Class

Copyright © 2005 Microsoft Corporation.
All rights reserved.