As mentioned above, /atg/commerce/search/catalog/QueryFormHandler component is configured to use the /atg/search/repository/FacetSearchTools component as a request preprocessor and postprocessor. In addition to faceted search-related processing (described in Issuing Faceted Search Queries), the FacetSearchTools component manages catalog constraints for all queries, not just faceted search queries.

By default, when a user enters a search query, FacetSearchTools checks the user’s profile to see if he or she is assigned a catalog. If so, FacetSearchTools constrains the search to include only items in this catalog.

This behavior may not be desirable in certain 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.