The ATG platform uses customization adapters to submit post-indexing customization data to ATG Search. Each customization adapter is a Nucleus component that is invoked by ATG Search Administration when it runs an indexing job. When you set up a project in ATG Search Administration for indexing your Commerce catalog, you can select the customization adapters to include in the project as part of specifying the indexing content.
There are three customization adapters commonly used to submit post-indexing customization data for ATG Commerce sites:
/atg/commerce/search/refinement/CatalogRefineConfigAdapter
– Manages the process of generating the refinement configuration files used for Dynamic Search and Navigation and submitting them to ATG Search./atg/commerce/search/config/CatalogRankConfigAdapter
– Manages the process of generating the search configuration files used for Search Merchandising and submitting them to ATG Search./atg/commerce/search/config/SearchUpdateAdapter
– Manages the process of collecting updated inventory information used for Search Merchandising and submitting it to ATG Search.
Registering Adapters
To make the customization adapters available in ATG Search Administration, they must be registered with the /atg/search/adapter/customization/CustomizationAdapterRegistry
component. This component has a nameToNucleusPath
property that lists the registered adapters (if you are using CIM, this step is done automatically). This property is a Map in which each key is the display name of an adapter and the corresponding value is the actual Nucleus component.
The CustomizationAdapterRegistry
component is in the DAF.Search.Index
module, but by default nameToNucleusPath
is not set there. The DCS.Search.Index
module adds the three ATG Commerce customization adapters to the Map:
nameToNucleusPath+=\ select_custsource_type.repository.rank_config=/atg/commerce/search/config/ CatalogRankConfigAdapter,\ select_custsource_type.repository.staging_rank_config=/atg/commerce/search/config/ CatalogRankConfigAdapter_staging,\ select_custsource_type.repository.search_update=/atg/commerce/search/config/Search UpdateAdapter,\ select_custsource_type.repository.staging_search_update=/atg/commerce/search/ config/SearchUpdateAdapter_staging,\ select_custsource_type.repository.refine_config=/atg/commerce/search/refinement/ CatalogRefineConfigAdapter,\ select_custsource_type.repository.staging_refine_config=/atg/commerce/search/ refinement/CatalogRefineConfigAdapter_staging
In this configuration, each Map key (such as select_custsource_type.repository.rank_config
), is a resource bundle key that represents the displayName
property of the corresponding adapter component, rather than being the display name itself. Using the resource bundle key allows you to modify or translate the displayName
value without affecting the registration of the component.
Configuring Adapters
The customization adapters are invoked on the ATG Search Administration environment, but the processes they execute run on the Commerce site environment. Therefore, you must have separate sets of adapter components on each environment, and configure them to communicate over RMI.
The CatalogRefineConfigAdapter
, CatalogRankConfigAdapter
, and SearchUpdateAdapter
components are actually generic references that you configure to point to other components:
On the Commerce site, these components point to local customization adapters that actually run the processes.
On the Search Administration environment, these components point to proxies that communicate remotely with the customization adapters running on the Commerce site.
Configuring the Adapters on the Production Server
The customization adapters are configured by default, so you typically do not need change the configuration on the Commerce site.
If for some reason you need to configure a customization adapter on the Commerce site, set its componentPath
property to the Nucleus pathname of the corresponding local adapter:
For the
CatalogRefineConfigAdapter
, set thecomponentPath
property to/atg/commerce/search/refinement/LocalCatalogRefineConfigAdapter
.For the
CatalogRankConfigAdapter
, set thecomponentPath
property to/atg/commerce/search/config/LocalCatalogRankConfigAdapter
.For the
SearchUpdateAdapter
, set thecomponentPath
property to/atg/commerce/search/config/LocalSearchUpdateAdapter
.
Configuring the Adapters on the Asset Management Server
In the asset management environment, set up the proxies that communicate with the customization adapters on the Commerce environment. First, configure the CatalogRefineConfigAdapter
, CatalogRankConfigAdapter
, and SearchUpdateAdapter
components to point to their corresponding remote proxies:
For the
CatalogRefineConfigAdapter
, set thecomponentPath
property to/atg/commerce/search/refinement/RemoteCatalogRefineConfigAdapter
.For the
CatalogRankConfigAdapter
, set thecomponentPath
property to/atg/commerce/search/config/RemoteCatalogRankConfigAdapter
.For the
SearchUpdateAdapter
, set thecomponentPath
property to/atg/commerce/search/config/RemoteSearchUpdateAdapter
.
Now configure the RemoteCatalogRefineConfigAdapter
, RemoteCatalogRankConfigAdapter
, and RemoteSearchUpdateAdapter
components to communicate with the adapters running in the production server. Set the enabled
property of these components to true
, and set the remoteHost
and remotePort
properties to the machine name and RMI port number of the ATG instance on which the Commerce site application is running (if you are using CIM, this step is done automatically). For example:
enabled=true
remoteHost=production.host.com
remotePort=28860
If your installation includes a staging server, you will need to give the asset management server access to those configuration adapters as well. Configure the following components as indicated:
/atg/commerce/search/config/CatalogRankConfigAdapater_staging
componentPath=RemoteCatalogRankConfigAdapter_staging
/atg/commerce/search/config/RemoteCatalogRankConfigAdapter_staging
enabled=true
remoteHost=staging.host.com
remotePort=18860
/atg/commerce/search/config/SearchUpdateAdapter_staging
componentPath=RemoteSearchUpdateAdapter_staging
/atg/commerce/search/config/RemoteSearchUpdateAdapter_staging
enabled=true
remoteHost=staging.host.com
remotePort=18860
Invoking Adapters
Each time a catalog indexing job runs, ATG Search Administration invokes the specified post-indexing customization adapters after the indexing itself is complete. Doing this ensures that ATG Search has up-to-date search refinements, search configurations, and inventory information (assuming you specify the appropriate adapters).
Depending on the needs of your site, you may want to run the customization adapters more frequently than you re-index the product catalog. This is particularly true if your inventory information changes rapidly, and your search configurations include rules based on inventory status. For example, for rules that exclude out-of-stock items, you want to make sure the data that triggers these rules is up to date.
When you set up scheduled indexing jobs for your project in the ATG Search Administration UI, you can also set up post-indexing customizations jobs and schedule them to run more frequently than the indexing jobs. For more information about creating and scheduling post-indexing customizations jobs, see the ATG Search Administration Guide.