Page 1 of 1

Change document paths

PostPosted:Mon Mar 26, 2012 9:20 am
by aempinheiro
Hello everyone,

I have an OpenKM version 5.0.2 with the default configuration for the repository, the one that comes with the download of OpenKM bundle.

The repository has mainly one folder and then one folder per document, at the moment the number of folders inside the main one is around 155000. (I didn't do this, I just have to fix it now so don't flame me).
The main problem is that creation of new documents is extremely slow, a 4byte document takes 2min 30sec to create, although the get is done in milliseconds.

I need to change the paths of all 155000 documents and I need to stay away the LRUNodeIdCache and the BundleCache, meaning a low level path changing. Therefore I presume the move method on the OKMDocumentService won't do.

Does anyone have any suggestions on how to do this?

I was thinking on hooking up to the derby database where the repository is saved, but my main problem is that I can't find the the path attribute that I could maybe update it... any ideas?

Thank you in advance for any help you can provide!

Re: Change document paths

PostPosted:Tue Mar 27, 2012 6:25 pm
by pavila
Too many documents and folder for Hipersonic. I can't image how slow if the system with this configuration. The bad news is that you can't change the node path modifying the database, because Jackrabbit store this information serialized.

OpenKM 5.0.4 is very old. I would recommend to update to a more recent OpenKM release.

Re: Change document paths

PostPosted:Wed Mar 28, 2012 7:57 am
by aempinheiro
Well I can tell you how slow it is (this is with a Hessian interface not WS):
- creation of a ~100byte document takes ~2m 30s. (all the log that I see is essentially caching stuff on LRUNodeIdCache and BundleCache)
- getting a ~100byte document takes ~5ms. (yes milliseconds!)


We are upgrading OpenKM but exactly because of that we want to also update/change the repository from this flat structure to a structure with intermediate nodes.

If I understand what you are saying... the only solution is then to actually do a new repo and fetch content from the old and create it on the new one...

It is so?

Re: Change document paths

PostPosted:Sat Mar 31, 2012 8:09 am
by pavila
The easiest way is perform a Administration > Repository export in the old OpenKM intallation, and a Repository import in the new one.