Folders are: *org.apache.jackrabbit.JcrConstants.NT_FOLDER*
Documents are:

                Binary fileBinary =
session.getValueFactory().createBinary(new ByteArrayInputStream(data));
                Node newFile = parentNode.addNode(filename,
*JcrConstants.NT_FILE*);
                newFile.addMixin(*JcrConstants.MIX_VERSIONABLE*);
                Node docContents = newFile.addNode(
*JcrConstants.JCR_CONTENT*, *JcrConstants.NT_RESOURCE*);
                // docContents.setProperty(JcrConstants.JCR_MIMETYPE,
getMimeType(filename, getFileExtension(filename)));
                docContents.setProperty(JcrConstants.JCR_MIMETYPE,
FileUtils.getMimeType(FileUtils.getFileExtension(filename)));
                docContents.setProperty(JcrConstants.JCR_ENCODING, "");
                docContents.setProperty(JcrConstants.JCR_DATA, fileBinary);

Is there a better choice?

On Fri, Mar 16, 2018 at 11:44 AM, Julian Reschke <[email protected]>
wrote:

> On 2018-03-16 16:35, William Markmann wrote:
>
>> Has anyone experienced a significant slowdown when adding many (tens /
>> hundreds of thousands) of documents to an Oak repository?
>> ...
>>
>
> What's the JCR node type of the folder you are inserting into?
>
> Best regards, Julian
>



-- 
*Bill Markmann*
*President | 866 809 0394 x 701*
*Counterpoint Consulting*
*Automate. Innovate. Accelerate.*
c20g.com | *Blog <http://www.c20g.com/site/blog> **| Linkedin
<http://www.linkedin.com/company/counterpoint-consulting-inc.>** | Twitter
<https://twitter.com/c20g>*

Reply via email to