Today we will learn to cook Endeca Partial update with CAS data. We will pick the raw material and get partial updated data ready to be served.
Ingredients :
Apart from other ingredients , following are the main constituents to cook endeca partial update
* An update Manipulator
* A Record manipulator
* A record spec
How to cook :
Mark the record spec property
Mark a unique property as record spec
Build a pipeline using update manipulator and record manipulator which will look like this :
Ingredients :
Apart from other ingredients , following are the main constituents to cook endeca partial update
* An update Manipulator
* A Record manipulator
* A record spec
How to cook :
Mark the record spec property
Mark a unique property as record spec
Build a pipeline using update manipulator and record manipulator which will look like this :
Before you put this pipeline on stove ( i.e run partial update from control folder of app) , you should first do following : Update manipulator will look like this :
Now add some salt to the solution :
This salt is most important. Here you add the record spec with source as Endeca.Id and target as your record spec property
Add pass trhoughs to input CAS adapter :
Following is the code to be added to forge.context.xml :
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:lang="http://www.springframework.org/schema/lang"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/lang
http://www.springframework.org/schema/lang/spring-lang.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.0.xsd">
<!-- load external properties, see
./config/script/fcm.properties -->
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property
name="locations">
<list>
<value>classpath:environment.properties</value>
</list>
</property>
</bean>
<!-- base
(abstract) record store adapter to avoid config duplication -->
<bean
id="commonRecordStoreAdapter"
class="com.endeca.esource.springadapter.ConfigurableDelegateAdapter"
abstract="true">
<property name="adapter">
<bean
class="com.endeca.itl.recordstore.forge.RecordStoreSource"/>
</property>
<property name="config">
<map>
<entry key="HOST" value="${CAS_HOST}" />
<entry key="PORT" value="${CAS_PORT}" />
<entry key="CLIENT_ID" value="FORGE" />
</map>
</property>
</bean>
<!-- Forge
record stores -->
<bean
id="jobsBaselineRecordStoreAdapter"
parent="commonRecordStoreAdapter" lazy-init="true">
<property name="config">
<map merge="true">
<entry key="READ_TYPE" value="BASELINE" />
<entry key="INSTANCE_NAME" value="jobJdbcDsCmdLine"
/>
<entry key="CLIENT_ID" value="jobsFORGEId" />
</map>
</property>
</bean>
<bean
id="jobsPartialRecordStoreAdapter"
parent="commonRecordStoreAdapter" lazy-init="true">
<property name="config">
<map merge="true">
<entry key="READ_TYPE" value="DELTA" />
<entry key="INSTANCE_NAME" value="jobJdbcDsCmdLine"
/>
<entry key="CLIENT_ID" value="jobsFORGEId" />
</map>
</property>
</bean>
</beans>
Ready to cook good : Run the partial_update script .
Ready to Eat. :)

No comments:
Post a Comment