Store Content in IDOL Server > Process Data before you Index > Use Add2Replace > Example

Example
In the following example, an Add2Replace task replaces fields in an existing file. It uses the following configuration:
[TaskName]
Module=Add2Replace
NextTask=Task38
Params=Summary,Sentences
ReferenceField=DREFERENCE
SourceFields=ORIGINALFILENAME
TargetFields=FILENAME
DREFieldValueString=DREFIELDVALUEIFNOTFOUND
Every time IDOL server performs this task on an incoming document, it converts the DREADD index action into a DREREPLACE. It converts the field OriginalFileName from the DREADD into FileName in the DREREPLACE action, and it places the field value of the OriginalFileName field in the DREFIELDVALUEIFNOTFOUND parameter of the DREREPLACE action.
This section of an IDX file is changed from:
#DREREFERENCE myref
#DREFIELD ORIGINALFILENAME="my.txt"
...
to:
#DREDOCREF myref
#DREFIELDNAME FILENAME
#DREFIELDVALUEIFNOTFOUND my.txt