ProductCatalog.RegenerateFreeTextSearchIndex
Use this method to regenerate the free text search index of a catalog.
Definition
Sub RegenerateFreeTextSearchIndex(fGenerateIncremental As Boolean)
Parameters
fGenerateIncremental
A Boolean 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. The default value is False.
Return Values
None.
Error Values
This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM 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 | &H8898004C | 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. In particular, the Description property may contain 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.
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.
Example
myProductCatalog.RegenerateFreeTextSearchIndex TRUE