A {@link Document} filter that adds a new {@link Property}or adds values to an existing Property.
If the {@code overwrite} flag is {@code true}, the new property values replace any existing values of the target property. Otherwise, the new property values augment any existing values of the target property.
Example {@code documentFilters.xml} Configurations: The following example tags all fed documents with source department identification meta-data. It adds a {@code DeptId} property, withthe single value {@code Finance} to all documents.
<!-- Tag all documents fed from this department with a source ID. --> <bean id="AddDeptId" class="com.google.enterprise.connector.util.filter.AddPropertyFilter"> <property name="propertyName" value="DeptId"/> <property name="propertyValue" value="Finance"/> <property name="overwrite" value="true"/> </bean>
The following example adds "Carlton Whitfield" to the list of {@code Authors}for all documents.
<!-- Add myself as co-author of all documents. Gain citation notoriety. --> <bean id="AddAuthor" class="com.google.enterprise.connector.util.filter.AddPropertyFilter"> <property name="propertyName" value="Author"/> <property name="propertyValue" value="Carlton Whitfield"/> <property name="overwrite" value="false"/> </bean>
@since 2.8