Search Profile Activation Services and Strategies

Activation of search profiles requires the use of services and strategies which interact with each other.

Have a look at the scenarios below to see the interactions between the services and strategies.

Activating a Directly Specified List of Search Profiles

If the case assumes making a specific list of search profiles active, the list of current search profiles will be returned.

Activating Search Profiles in Context

In the case of activating the list of not directly specified search profiles it depends on a given search context. As a result, the system goes through the activation strategies to discover which search profiles should be active for a given context. The results returned from the different activation strategies are collected in a single list. The duplicates are not removed.

Below you can see the details of each service.

AsSearchProfileActivationService

This service is the main entry point for the activation process.

AsSearchProfileActivationStrategy

Implementing this strategy allows for activation of the search profiles.

Mapping

For a new activation strategy to be recognized and used, it needs to be mapped. The <priority> property defines the order according to which the strategies are executed. A higher priority means that the strategy will be executed first.

The defaultAsSearchProfileActivationMapping enables the default activation strategy. This strategy allows for the configuration of the list of active search profiles in the database (AsSearchProfileActivationSet type).
<bean id="defaultAsSearchProfileActivationMapping" parent="asSearchProfileActivationMapping">
  <property name="priority" value="100" />
  <property name="activationStrategy" ref="asSearchProfileActivationStrategy" />
</bean>

For details on how to create an activation set for your profiles see Search Profiles in Backoffice Administration Cockpit.

Default Activation Strategy

There is a default activation strategy that allows to configure the list of active search profiles in the database (AsSearchProfileActivationSet type).
<bean id="defaultAsSearchProfileActivationMapping" parent="asSearchProfileActivationMapping">
  <property name="priority" value="100" />
  <property name="activationStrategy" ref="asSearchProfileActivationStrategy" />
</bean>
A list of search profiles can be set for each combination of a catalog version and index type.
$indexType=testIndexedType${testId}
$catalogVersion=catalogVersion(catalog(id[default='hwcatalog']),version[default='Online'])[unique=true,default='hwcatalog:Online']
 
INSERT_UPDATE AsSimpleSearchProfile;code[unique=true];name;indexType[default=$indexType];$catalogVersion[unique=true]
;searchProfile1;Simple Search Profile;;
 
INSERT_UPDATE AsSearchProfileActivationSet;indexType[default=$indexType][unique=true];$catalogVersion[unique=true];searchProfiles(code,$catalogVersion)
;;;searchProfile1