Hi,

On Fri, 2015-08-21 at 14:07 +0000, Thomas Mueller wrote:
> Hi,
> 
> The DocumentStore doesn't really know the path, it only knows the
> key, and
> if the key is hashed you can't calculate the path.
> 
> There are some options:
> 
> (a) Each document that has a hashed path as the key also has a "path"
> property (with the real path). You could use that (cache it, read it
> if
> needed, possibly from all backends).

That's mostly the approach that we have taken for now. I don't think a
(slight) performance penalty for hashed documents is a huge issue in
the prototype stage, so if I can't extract the path out of the key I
simply ask all the stores ( details at [1] ). This seems to work out
fine so far.

Thanks,

Robert

[1]: https://github.com/rombert/jackrabbit-oak/blob/f05398694fa3bb7b2fb
7feb96e16efc2d97a7e84/oak
-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/Multiple
xingDocumentStore.java#L32-L62

Reply via email to