How can I supply multi-value property values with the bulk document importer?

I am attempting to use the bulk document importer and the FileWithIndividualMetadasSourceNode to load custom metadata for many files in the filesystem. I have tried several formats for the properties documents listed there. Right now I have .properties files with contents like this:

dc\:title=Social media marketing
book\:bookEdition=
creativework\:publisher=Pearson
creativework\:keywords=Internet advertising|Internet marketing|Online social networks|Social media
creativework\:author=Tuten, Tracy L.|Solomon, Michael R.
creativework\:copyrightYear=2013
book\:isbn=9780132551793

But the importer log reports errors like this:

DEBUG : Unable to create leaf document for /Users/shuwig/prod_data/isbnpdfs/9780071748469.pdf:org.nuxeo.ecm.core.api.model.PropertyConversionException: Property Conversion failed from class java.lang.String to class [Ljava.lang.Object;: /creativework:author

The related parts of the schema simply look like:

   <xs:simpleType name="textList">
     <xs:list itemType="xs:string"/>
   </xs:simpleType>
    ...
   <xs:element name="author" type="lt:textList"/>

and everything about my document type works fine except for importing in bulk.

Is it possible to import multi-value metadata elements via the bulk importer? How can I do this without receiving the above error?

0 votes

1 answers

1583 views

ANSWER

I did some more investigation and found something odd. It's not the fields that have multiple values that are failing, it's the multi value fields with only one entry in this instance, e.g. creativework\:author=Willard, Wendy.
05/15/2014

Maybe surrouding them with braces, like creativework\:author={Willard, Wendy} ?
11/13/2015



Try to add a pipe “|” at the end of the string for multi valued property even if there is only one item.

0 votes