(using solr 4.10.3)
I have a solr schema with three dates:
requiredDate (a required field)
optionalDate (not required)
resolvedDate (populated by #1 or #2)
Because I need to use ResolvedDate for sorting, it is multiValued="false". I am trying to populate resolvedDate using the behavior; "Use the optional field value if available, else fallback to the required field value". My attempt with:
<copyField source="requiredDate" dest="resolvedDate" /> <copyField source="optionalDate" dest="resolvedDate" />
has failed due to trying to copy multiple values to a single value field.
Can I implement a field with this fallback behavior in either the schema or the UpdateRequestHandler definition? How?