Thursday, March 17, 2016

Oracle Endeca 11.x : How to Setup Precedence Rules?

A Precedence Rule provides a way to hide the display of dimensions until someone click a dimension or a particular navigation state. Preced... thumbnail 1 summary
A Precedence Rule provides a way to hide the display of dimensions until someone click a dimension or a particular navigation state. Precedence rules are defined in terms of a trigger dimension or trigger dimension value and a target dimension. A user's selection of the trigger dimension value exposes the previously unavailable target dimension to the user.


There are two types of precedence rules, standard and leaf:

1. The standard type means that if the navigation state contains the trigger dimension value or any of its descendants, then the target dimension value is displayed. 

2. The leaf type works similarly, but only considers leaf dimension values (those with no children) as possible triggers.

Example:- 

1. Display Category after selecting a department. This rule will show Category dimension after clicking of any department

Open <<Endeca_APP>>/config/index_config/index-config.json

and add following rules under precedence rule section

"Rule-name-1" : {
"targetDimension" : "product.subCategory",
"triggerDimension" : "product.department",
"isLeafTrigger" : false

}

2. Clicking on Category like 
Shoes than display Shoes Size. 
Clothing than Clothing sze

add following extra rules under precedence rule section. This rule would be triggered based on specific refinement.

"Rule-Name-2" : {
"triggerDimension" : "product.subCategory",
"triggerDimensionValueSpec" : "Shoes",
"targetDimension" : "product.shoeSize",
"isLeafTrigger" : true

  }

Note :- triggerDimensionValueSpec accepts dimension value spec not the N-value.

Run the following command from apps control after making changes in index_config.json

 ./index_config_cmd.sh set-config -o system -f <<File_Path>>/index-config.json





3 comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi Ajay,

    I am trying to setup scenario 1. I have already indexed dimensions very well, able to see in the JSPREF app.

    When I am running below command I am getting below error,

    C:\Endeca\Apps\myApp\control>index_config_cmd.bat set-config -o system --f C:\Endeca\Apps\myApp\config\index_config\index-config.json
    [03.30.17 20:21:21] INFO: Using site logistore at URL http://local.com:8006/ifcr with username admin
    [03.30.17 20:21:22] SEVERE: The index configuration JSON file contains invalid configuration type: system. Expected one of [attributes, precedenceRules, searchIndexConfig].

    But when I was running above command with the "-o all" option, I am not able to see the above errors, it's going fine.

    Do you have any debug steps to identify what is going wrong in my case.

    Do I need to mentioned above 2 properties in any other configuration files, apart from index_config.json. Please provide your ample inputs.

    Thanks,
    Swapnil

    ReplyDelete
    Replies
    1. Can you please help me to get json file. Seems like issue there.

      Thanks,
      Ajay Agrawal

      Delete

Text Widget