Monday 29 July 2013

Dynamic Facet : facet when its name is not known

Dynamic Facet(facet when its name is not known):

Think a  scenario where user has to create a facet in a search and promote account, but its name is not
known when we start up the S&P configuration. So what we can do?

CQ is going to introduce dynamic facets for this task. So before this let us do a manual work around for the same.

Our requirement is quiet simple. We need a facet which we don't have their name in hand when work is done. Let us fold our sleeves and get into work.
Below are the steps for the same.

1) Define the facets in XML file.

2) Then in index connector we have to access this values to two fields called  test_facet_name,  test_facet_value through record/mapping.

3) This has now to be defined in meta data definition as text fields.Say test_facet_name, test_facet_value
4) In filtering script we need to iterate this name value pair and load the values in some name value fields like test_name1{name,value},test_name2{name,value}.....

5) Now we need to create meta data with text fields test_name1, upto how many unknown named total facets required.

6) There is a limitation in S&P, we need to contact Adobe team to raise the meta data count.

7) Then this name value is is passed to output by creating facets with names  as test_name1, test_name1 etc upto total number of facets.

8) Now display it through presentation layer.(remember to add those in transport layer too.)

Now the dynamic run time generated facets are ready. Actually these facets we are naming in run time, it was created already during configuration.

No comments:

Post a Comment