cancel
Showing results for 
Search instead for 
Did you mean: 

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

Steven_Huwig1
Star Contributor
Star Contributor

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?

3 REPLIES 3

Steven_Huwig1
Star Contributor
Star Contributor

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\

Greg_Drayon
Star Contributor
Star Contributor

Maybe surrouding them with braces, like creativework\

zyx974_
Confirmed Champ
Confirmed Champ

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