IProductCatalog::RegenerateFreeTextSearchIndex

Ee784953.c++_off(en-US,CS.10).gifEe784953.vb_on(en-US,CS.10).gif

Use this method to regenerate the free text search index of a catalog.

Definition

HRESULT IProductCatalog::RegenerateFreeTextSearchIndex(VARIANT_BOOLfGenerateIncremental);

Parameters

fGenerateIncremental

[in, defaultvalue(0)] A VARIANT_BOOL that determines whether an incremental or a full rebuild of the free text search index is to be performed. A value of True indicates an incremental rebuild. A value of False indicates a full rebuild. See the Remarks section for more information.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_CANNOT_REFRESH 0x8898004C A catalog import operation is currently in progress. The refresh operation cannot be performed now.

Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Remarks

This method should be called after new products or categories are added to a catalog. Otherwise, those new products and categories will not be returned in any free text search results.

The fGenerateIncremental parameter determines what type of free text index rebuild to perform. The default is to completely rebuild the free text index. Though this option ensures completeness, it is slower than an incremental rebuild, which appends only recently added products and categories to the index.

If the database in which Commerce Server keeps its catalog data does not have the SQL Server 2000 full-text engine installed, this method will return with no action.

Ee784953.note(en-US,CS.10).gif Note

  • This method cannot be called in a transacted object. This method involves the creating, deleting, or updating of free text indexes. SQL Server does not allow these operations in a transaction.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

See Also

ProductCatalog Object


All rights reserved.