Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to configure Dynamic Facets in Adobe Search and Promote?

Dynamic Facets

The Dynamic Facet is used to create new range selections automatically at the time of search. The facets are included dynamically based on the search result.

The Dynamic Facets feature is not enabled in Adobe Search&Promote, by default. Contact Technical Support to activate the feature for your use.

In our previous tutorial, we have seen how to enable static facet for the search results. Refer the below link for the details, the steps are going to be same for Dynamic facet with small changes.

How to configure Navigation Facet in Adobe Search and Promote?

The Facets can be used to customize your presentation layer and provide your users with a Guided Search that lets them…

medium.com

Facets that are sparsely populated across your website and only appear for a subset of searches are good candidates to make dynamic.

In our example, the product with type “Watch” will have an additional attribute with name “size” and the facet associated with “size” is applicable only for the searches with keyword “Watch”.

The search with key word “Watch” will shows two facets “productType”(static) and “size”(dynamic) but the search with “Book” will shows only “productType”(static) facet.

adobe-search-and-promote-dynamic-facet

Configuring Dynamic Facet

Some additional configuration required to enable Dynamic Facet compared to Static Facet(Refer Static facet tutorial for basic configurations)

Enabled additional product attribute to the feed file based on the product Type — “size”, “size” attribute is applicable only for the productType “Watch”



Product Feed

https://www.example.com/product-title/p/prod1
<br style="box-sizing: inherit;"><br style="box-sizing: inherit;">

Prod1 description]]>

Book
prod1
/content/dam/Images/product/prod1.jpg


https://www.example.com/product-title/p/prod2
<br style="box-sizing: inherit;"><br style="box-sizing: inherit;">

Prod2 description]]>

Book
prod2
/content/dam/Images/product/prod2.jpg

https://www.example.com/product-title/p/prod3
<br style="box-sizing: inherit;"><br style="box-sizing: inherit;">

Prod3 description]]>

Watch
10

prod3
/content/dam/Images/product/prod3.jpg


https://www.example.com/product-title/p/prod4
<br style="box-sizing: inherit;"><br style="box-sizing: inherit;">

Prod4 description]]>

Watch
20

prod4
/content/dam/Images/product/prod4.jpg


Create a new meta data definition for “size” field, Settings → Metadata →Definitions

Enable Dynamic Facet option for the metadata

Update the IndexConnector configurations with new meta data field “size”, Settings → Crawling →Index Connector

adobe-search-and-promote-dynamic-facet

Configure facet with name “size” — there is no “Dynamic Facet” setting in Facet, only the configuration is in the underlying metadata configuration(already enabled), Design →Navigation →Facets

adobe-search-and-promote-dynamic-facet

Configure a new Query Cleaning rule, Rules → Query Cleaning , to set the backend parameter “sp_sfvl_df_count”, the sp_sfvl_df_count parameter
determines the total number of dynamic facet fields to return.

adobe-search-and-promote-dynamic-facet

Update the back end transport with Dynamic Facet Support


{
"general": {
"query" : "",
"total" : "",
"lower" : "",
"upper" : ""
},
"facets" : [
{
"name" : "productType",
"values" : [],
"counts" : []
},
{
"name" : "",
"dynamic-facet" : 1,
"values" :
[],
"counts" : []
}

],
"results" : [

{
"fields" :
[
{
"name" : "mdi",
"value" : ""
},
{
"name" : "title",
"value" : ""
},
{
"name" : "productType",
"value" : ""
},
{
"name" : "size",
"value" : ""
}

]
}
,

]
}

Update the presentation transport with Dynamic Facet Support


(
{
"general" :
{
"query" : "",
"total" : "",
"page_lower" : "",
"page_upper" : "",
"page_total": ""
},
"facets" :
[


{
"label" : "",
"long" : truefalse,

"selected" : true,
"undolink" : "",

"values" :
[

{
"value" : "",
"selected" : "truefalse",
"count" : "",
"link" : "",
"undolink" : "",
"threshold" : truefalse
},

]
}





,{
"label" : "",
"long" : truefalse,

"selected" : true,
"undolink" : "",

"values" :
[

{
"value" : "",
"selected" : "truefalse",
"count" : "",
"link" : "",
"undolink" : "",
"threshold" : truefalse
},

]
}



],
"results" :
[

{
"index" : "",
"title" : "",
"productType" : "",
"size" : ""


},

]
}
)

The configurations are ready, let us now run a Stage indexing (note the configuration are not pushed to live yet)

Index →Full Index →Staged Index →Run Full Index

adobe-search-and-promote-dynamic-facet

Access http://stage-xxxxxxxxxxx.guided.ss-omtrdc.net/do=json&sp_staged=1&sp_q=Watch

xxxxxxxxxxx — Search and Promote account number

This will respond with JSON data which contains the required Static, Dynamic facet and meta data details.

{
"general": {
"query": "",
"total": "2",
"page_lower": "1",
"page_upper": "2",
"page_total": "1"
},
"facets": [
{
"label": "productType",
"long": false,
"values": [
{
"value": "Watch",
"selected": "false",
"count": "2",
"link": "?do=json;i=1;q1=Watch;sp_q=Watch;sp_staged=1;x1=productType",
"undolink": "",
"threshold": false
}
]
},
{
"label": "size",
"long": false,
"values": [
{
"value": "10",
"selected": "false",
"count": "1",
"link": "?do=json;i=1;q1=10;sp_q=Watch;sp_staged=1;x1=size",
"undolink": "",
"threshold": false
},
{
"value": "20",
"selected": "false",
"count": "1",
"link": "?do=json;i=1;q1=20;sp_q=Watch;sp_staged=1;x1=size",
"undolink": "",
"threshold": false
}
]
}
]
,
"results": [
{
"index": "",
"title": "Watch Prod3 Title",
"productType": "Watch",
"size": "10"
},
{
"index": "",
"title": "Watch Prod4 Title",
"productType": "Watch",
"size": "20"
}
]
}

The configuration can be pushed live after successful validation and run a live index →Full Index →Live Index →Run Full Index

adobe-search-and-promote-dynamic-facet

The URL to access live data http://xxxxxxxxxxx.guided.ss-omtrdc.net/do=json&sp_q=Watch

The facet data in the response can be used to present the filtering options to users to narrow down the website search. The Dynamic Facet option enables the facets based on the search data.



This post first appeared on Albin's, please read the originial post: here

Share the post

How to configure Dynamic Facets in Adobe Search and Promote?

×

Subscribe to Albin's

Get updates delivered right to your inbox!

Thank you for your subscription

×