Hi, Should the opaque String key be abstracted into a DocumentKey interface so that how the key is interpreted, and how it might be associated with a certain type of storage can be abstracted as well, rather than relying on some out of band specification of the key to be serialised and parsed at every transition ? Best Regards Ian
On 9 June 2015 at 15:14, Robert Munteanu <[email protected]> wrote: > Hi, > > I'm looking into implementing a multiplexing DocumentStore which would > allow multiple DocumentStore instances to appear as one. For instance, > there would be an instance mounted at '/', and another mounted at > '/var'. > > I would however need to know, based on the key, for which DocumentStore > instance an operation is targeted. > > According to the DocumentStore javadoc "Keys are opaque strings.". > However, the Document#ID javadoc says that "For nodes, the document id > contains the depth of the path (0 for root, 1 for children of the > root), and then the path." > > Is it feasible to rely on the document key being of the "depth:path" > format at the DocumentStore level? > > If it's not, what alternatives are there to finding out which > DocumentStore instance 'owns' a certain Document? > > Thanks, > > Robert >
