Commerce Foundation CatalogEntity CommerceQuery

Use this entity to run full text search on all catalogs in this site that the CommerceCatalogFullTextSearch message specifies. The CommerceCatalogFullTextSearch is a new message, unique to Microsoft Multi-Channel Commerce Foundation, for extending the CommerceSearchCriteria abstract class to permit free text and advanced free text queries on some or all catalogs in the site.

Syntax

        var query = new CommerceQuery<CommerceEntity, CommerceCatalogFullTextSearchBuilder>("CatalogEntity");
      

CommerceCatalogFullTextSearchBuilder Parameters

Parameter

Description

Catalogs

List of all catalog names to search. If Null, searches all catalogs in the site.

Phrase

The search phrase.

TypesToSearch

Catalog entity types to search and return. You can combine these flags by using the OR operator.

FullTextSearchType

Maps to the Commerce Server UseAdvancedFreeText option. When this option is FreeText, attempts to use the more inclusive T-SQL FreeTextTable (if no operators or wildcards are specified), otherwise the system uses ContainsTable.

InventoryFilters

Maps to the InventoryOptions functionality of Commerce Server to grant the caller the ability to restrict results to those that meet the specified inventory filter.

FirstItemIndex

Use to indicate the start position for paging results. For example, to see page 2 of a result set, where there are 10 results per page, specify 11.

ReturnTotalItemCount

Returns the total number of objects meeting the search criteria. Use in conjunction with paging.

NumberOfItemsToReturn

Used to specify the maximum number of items to return in the query operation response. If not specified, all items matching the search criteria will be returned.

SortProperties

If you specify this parameter, the results will be ordered by the specified column.

Dd464502.alert_note(en-US,CS.90).gifNote:
The property or properties that you specify must belong to all of the entity types specified in TypesToSearch, and SortDirection must be the same for all properties that you specify.

WhereClause

An additional TSQL where clause that can be used to specify which catalog entities will be selected by the query. For performance reasons, this fragment does not support using Commerce Server 2009 entity database column names. Instead, catalog property names must be used as defined in the Commerce Server Core Systems catalog system.

Operation Sequence Components

Operation Sequence Component

Description

CatalogEntityFullTextSearchProcessor

Retrieves the free text search results from Commerce Server for this site

Return Value

This query returns a CommerceQueryOperationResponse containing the Catalog entities matching the provided search criteria. The ModelName of the entities depends on which TypesToSearch were specified in the search criteria. If you specify multiple entity types in TypesToSearch, the model name will be CatalogEntity, otherwise, the model name will be the specific entity type requested.

Exceptions

The following exceptions can be thrown during this operation:

  • FautlException<GeneralOperationFault>

Remarks

The RequestContext object contains the user locale information that you use to return the categories in the appropriate language. If the language in the RequestContext is not currently supported, the system will use the default language for the categories being queried.

See Also

Other Resources

Commerce Foundation Product

Commerce Foundation CatalogEntity

Commerce Foundation Category

Commerce Foundation Variant

CommerceQuery