> If the field modes were parameters, they could be reused for other update handlers like SQL or CSV
> Perhaps something like:
Yes. I think we should decide a standard 'modify modes' syntax that can be used across handlers. In this example, I am using the string:
and passing it to 'parseFieldModes' in XmlUpdateRequestHandler.
Personally, I think all the modes should be specified in a single param rather then a list of them. I vote for a syntax like:
>> sku=REMOVE is required because sku is a stored field that is written to with copyField.
> I'm not sure I quite grok what REMOVE means yet, and how it fixes the copyField problem.
I'm using 'REMOVE' to say "remove the previous value of this field before doing anything." Essentially, this makes sure you new document does not start with a value for 'sku'.
> Another way to work around copyField is to only collect stored fields that aren't copyField targets.
I just implemented this. It is the most normal case, so it should be the default. It can be overridden by setting the mode for a copyField explicitly.