The /atg/commerce/search/testing/FacetSearchTools
component manages catalog constraints for all search tests.
By default, when a merchandising user runs a search test, FacetSearchTools
checks the user’s profile to see if he or she is assigned a catalog. If so, FacetSearchTools
constrains the test to include only items in this catalog.
This behavior may not be desirable in all situations. In a multisite environment that has a separate catalog for each site, this logic may interfere with cross-site searches, because the search will be constrained to a single catalog (and thus a single site). To prevent applying a constraint based on the catalog assigned to the user, set the queryByCatalog
property of the FacetSearchTools
component to false
.
If queryByCatalog
is false
, you can still have FacetSearchTools
constrain queries to specific catalogs by setting its catalogIds
property to an array of the catalog IDs of the catalogs to include in the search. For example:
catalogIds=masterCatalog,homeStoreCatalog
Note that if catalogIds
is not null, the value of queryByCatalog
is ignored. In this case, even if queryByCatalog
is true
, the catalog assigned to the user is ignored and the catalogs in the catalogIds
property are used for the catalog constraint.
Tip: The catalog ID appears at the top of the Details pane when you select a catalog in Merchandising.