Setting up a Hero product image (Product grouping)
Set up a Hero product image to increase the relevancy of products and search results in the storefront.
Overview
- Set up Hero image for keyword searches, category browsing. Using Hero product image for keyword searches and category browsing the business users can expand the search scope to include products and their underlying SKUs. By default, the Hero product image is enabled for keyword searches, and it is disabled for category browsing.
- Promote representative SKUs in store pages using merchandising attributes. Business users can promote certain product-specific SKUs when a shopper navigates category pages, and before the shopper selects any facets. It uses merchandising attributes.
- Show indexed price ranges for products in category pages.The hero section of the search profile enables configuring the navigation pages to display accurate price ranges based on the indexed offer price of all the entitled published SKUs for a product
Set up a Hero product image for keyword searches
- Enable or disable the Hero product image by adding the configuration to the
Zookeeperwc-component node. The endpoint is,
https://data_environment_hostname:30921/search/resources/api/v2/configuration?nodeName=component&envType=auth
Add the configuration,hero.searching.enabled=true/false
.Note: New configurations are added to the wc-component node using the POST request method. The existing configurations are updated using the PATCH request method. - Enable/ disable the Hero product image by adding configuration to the search
profile in Zookeeper. Add the group section with grouping field name to the
search profile as follows :
"group": { "enable": "true", "field": "relationship.product.group" }
Note:- If Hero product image is enabled in the wc-component node, then this configuration overrides the wc-component configuration. If Hero product image is disabled in thewc-component node, then this configuration does not take effect.
- There are following three ways that can be used to change
the configuration in the search profile,
- Create a custom profile by extending the existing search profile as a parent profile, and then add the updated hero section to the custom profile.
- Create a new search profile with all details from the parent profile. The profile name should not start with IBM or HCL. Pass this newly created profile name in profileName request parameter.
- Override the default profile by creating the same profile using the configuration endpoint. The name of the profile should be the same as the default profile name.For example, HCL_findProductsByCategory. This profile should not have any parent profile. If you use this approach, then you don’t need to make changes in .jsp file at the store side to change the profile details for the rest call.
http://data_environment_hostname:30920/search/resources/api/v2/documents/profiles/XXX_findProductsByCategory
https://data_environment_hostname:30921/search/resources/api/v2/documents/profiles/XXX_findProductsByCategory
You can provide visual relevancy for keyword searches in the storefront by updating the value for overrideFieldName in the hero section of the search profile. This value contains a comma-separated list of elastic search field names. When specified, some properties of the most relevant item in the product or result group override the returned product properties. For example, thumbnail or name. The default value is thumbnail.
"hero": {"overrideFieldName": "url.thumbnail,description.raw"}
- Enable or disable the Hero product image for keyword searches in the search
request parameter by passing the search request parameter
resultGroupForceTo
. Pass the value as true/ false. If the Hero product image is enabled in the search profile, then this parameter overrides the search profile configuration. If the Hero product image is disabled in the search profile level then, this parameter does not take effect.
Set Hero product Image for category browsing
- Enable or disable the Hero product image by adding the configuration to the
Zookeeper wc-component node. The endpoint is,
https://data_environment_hostname:30921/search/resources/api/v2/configuration?nodeName=component&envType=auth
Add the configuration,hero.browsing.enabled=true/false
.Note: New configuration are added to the component node using the POST request method. The existing configurations are updated using the PATCH request method. - By default, the Hero product image is enabled for category browsing in
wc-component node, but the search profile,
HCL_findProductsByCategory overrides it with the default
configuration by disabling
browse Hero product image
. Enable or disable the Hero product image by adding configuration to the search profile in Zookeeper. The endpoint is,https://data_environment_hostname:30921/search/resources/api/v2/documents/profiles/profileName
Add the group section with grouping field name to the search profile as :"group": { "enable": "true", "field": "relationship.product.group" }
Note:- If Hero product image is enabled in the wc-component node, then this configuration overrides the wc-component configuration. If Hero product image is disabled in thewc-component node, then this configuration does not take effect.
- There are following three ways that can be used to change
the configuration in the search profile,
- Create a custom profile by extending the existing search profile as a parent profile, and then add the updated hero section to the custom profile.
- Create a new search profile with all details from the parent profile. The profile name should not start with IBM or HCL. Pass this newly created profile name in profileName request parameter.
- Override the default profile by creating the same profile using the configuration endpoint. The name of the profile should be the same as the default profile name.For example, HCL_findProductsByCategory. This profile should not have any parent profile. If you use this approach, then you don’t need to make changes in .jsp file at the store side to change the profile details for the rest call.
http://data_environment_hostname:30920/search/resources/api/v2/documents/profiles/XXX_findProductsByCategory
https://data_environment_hostname:30921/search/resources/api/v2/documents/profiles/XXX_findProductsByCategory
You can provide visual relevancy for keyword searches in the storefront by updating the value for overrideFieldName in the hero section of the search profile. This value contains a comma-separated list of elastic search field names. When specified, some properties of the most relevant item in the product/result group override the returned product properties. For example, thumbnail or name. The default value is thumbnail.
"hero": {"overrideFieldName": "url.thumbnail,description.raw"}
- Enable or disable Hero product image for category facets in the search request
parameter by passing the search request parameter
resultGroupForceTo
. Pass the value as true/ false. If Hero product image is enabled in the search profile, then this parameter overrides the search profile configuration. If Hero product image is disabled in the search profile level then, this parameter does not take effect.
Promote representative SKUs in store pages using merchandising attributes
"hero": {
"field": {
"7741124012283334335": "Hero"
}
}
Show indexed price ranges for products in category pages
showGroupPriceRange
to the hero section of the search profile. By default, it is disabled. To
enable price range configuration, set value to
true:"hero": {
"showGroupPriceRange": "true",
}
Examples
{
"extendedconfiguration": {
"configgrouping": [
{
"name": "SearchConfiguration",
"property": [
{
"name": "hero.searching.enabled",
"value": "true"
}
]
}
]
}
}
"extendedconfiguration": {
"configgrouping": [
{
"name": "SearchConfiguration",
"property": [
{
"name": " hero.browsing.enabled",
"value": "true"
}
]
}
]
}
}
Sample search profile configuration made by creating the custom search profile by extending the existing profile as a parent profile:
{
"parentProfileName": "HCL_findProductsByCategory",
"profileName": "XXX_findProductsByCategory",
"query": {
"group": {
"enable": "true",
"sort": "score desc",
"field": "relationship.product.group"
},
"hero": {
"overrideFieldName": "url.thumbnail",
"showGroupPriceRange": "true",
"field": {
"7741124012283334335": "Hero"
}
}
}
}
Sample search profile configuration made by creating a new search profile with all details from the parent profile :
{
"profileName": "profileName",
"indexName": "IndexName",
"query": {
"params": [
{ "param1": "value1" },
{ "param2": "value2" }
],
"queryFields": [
"queryField1",
"queryField2"
],
"provider": [
"providerClass1",
"providerClass2"
],
"preprocessor": [
"preprocessorClass1",
"preprocessorClass2"
],
"postprocessor": [
"postprocessorClass1",
"postprocessorClass2"
],
"responseFields": [
"responseField1",
"responseField2"
]
}
}
{
"profileName": "HCL_findProductsByCategory",
"indexName": "product",
"query": {
"params": [
{ "param1": "value1" },
{ "param2": "value2" }
],
"sortFields": {
"1": "fieldName1 asc",
"2": "fieldName2 asc",
"3": "fieldName3 asc",
"4": "fieldName4 desc"
},
"queryFields": [
"queryField1"
],
"provider": [
"providerClass1",
"providerClass2"
],
"preprocessor": [
"preprocessorClass1",
"preprocessorClass2"
],
"postprocessor": [
"postprocessorClass1",
"postprocessorClass2"
],
"responseFields": [
"responseField1",
"responseField2"
],
"group": {
"enable": "true",
"sort": "score desc",
"field": "relationship.product.group"
},
"hero": {
"overrideFieldName": "url.thumbnail",
"showGroupPriceRange": "true",
"field": {
"7741124012283334335": "Hero"
}
}
}
}