I will try do what you propose. Please allow some time for this to be done, because this is a big project already, then I will mail a report on this. I believe it should work fine.
Thank you for your help Yves -----Message d'origine----- De : Thomas Müller [mailto:[email protected]] Envoyé : mardi 20 juillet 2010 10:22 À : [email protected] Objet : Re: Is there a way to store JackRabbit documents in two different datastores for one repository and yet index them with Lucene Hi, To store binaries, Jackrabbit uses the datastore API which is (relatively) stable and here to stay. The plan is to support it in Jackrabbit 3 as well. It's a relatively simple mechanism: you add a binary and get a unique identifier. There is even a Jackrabbit API to get the identifier: JackrabbitValue.getContentIdentity(). What you could do is: - Implement a new "multiplex-datastore" that supports a number of sub-datastores. It will read objects from any datastore that contains the entry. When storing it needs to check if it's already stored, and only if not it will store it in the first sub-datastore. - Configure Jackrabbit to use this multiplex-datastore. - Store the document within you application in the second datastore (see below). The datastore supports concurrent writes, so that can be in a different process if you want. - You probably need to store (stream) the object in Jackrabbit as well, but this will not create a new entry in the data store (the existing one is re-used). In theory, to avoid streaming the object again, you could create a JackrabbitValue yourself, but I didn't test that. It would be a nice feature in Jackrabbit. The solution would look like this: MultiplexDataStore (<= used by Jackrabbit) links to * FileDataStore @ /data/jackabbit/ (<= used by Jackrabbit to store new objects) * FileDataStore @ /data/app/ (<= used by your application) Regards, Thomas
