Monday, April 25, 2016

Endeca 11.x : How to Add manipulator using CAS?

Oracle Endeca 11.1 onwards forge less approach is used to index. Most of the data manipulation is done at the source level. Java Manipulator... thumbnail 1 summary
Oracle Endeca 11.1 onwards forge less approach is used to index. Most of the data manipulation is done at the source level. Java Manipulators required if some data manipulation required at CAS level.

Find out the list of steps to create manipulator, deploy into CAS and use in the Endeca project.
  • Create a Manipulator similar to as per sample provided by Oracle endeca. Sample can be found under <installpath>\CAS\version\sample\cas-extensions\src\main\com\endeca\cas\extension\sample\manipulator\substring.
  • Create a jar file for classes created for the custom manipulator. Sample example gives ant script to create a jar file.
  • Stop CAS service. Create a new folder under “<Installpath>\CAS\version\lib\cas-server-plugins. Place newly created jar and dependent jar to support manipulators under the newly created directory.
  • Start CAS services. Newly created manipulator would be registered in CAS service. To verify, run below command to see if CAS has registered newly created manipulators or not :-
    • <Installpath>\CAS\11.1.0\bin>cas-cmd.sh listModules
  • Update “<Endeca App Path>\CRS\config\cas\last-mile-crawl.xml” file to inject newly created manipulator to manipulate the data. Sample file attached
Manipulator Entry in Last-mile-crawl

  • Run the following command to update configuration in CAS 
    • <Installpath>\CAS\11.1.0\bin >./cas-cmd.sh updateCrawls -f <Endeca App Path>\CRS\config\cas\last-mile-crawl.xml
  • As per above example file, a “targetProperty” has created as “product.description123”. Mapping needs to be added for newly created property to Endeca indexing.
  • Add mapping in “<Endeca App path>\CRS\config\index_config\index-config.json”. find out the screenshot below
New attribute added in index-config.json

  • Run the following command to update configuration in Endeca configuration repository(ECR).
    • <Endeca App Path>\CRS\control>./index_config_cmd.shset-config -f ..\config\index_config\index-config.json -o all
  • Run baseline indexing process using App/control/./baseline_update.sh. Changes should be visible in endeca_jspref after indexing is done. 
Note :- Java Manipulators must be thread-safe. The CAS Server will invoke methods on this class from multiple-threads and potentially concurrently. 



From Author

Was this post resolve the solution you are looking for? are you looking for some other issues?Provide your comments

No comments

Post a Comment

Note: Only a member of this blog may post a comment.

Text Widget