Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E53C8975 for ; Fri, 12 Aug 2011 15:27:18 +0000 (UTC) Received: (qmail 64876 invoked by uid 500); 12 Aug 2011 15:27:17 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 64843 invoked by uid 500); 12 Aug 2011 15:27:16 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 64835 invoked by uid 99); 12 Aug 2011 15:27:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 15:27:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of justinedelson@gmail.com designates 74.125.83.42 as permitted sender) Received: from [74.125.83.42] (HELO mail-gw0-f42.google.com) (74.125.83.42) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Aug 2011 15:27:11 +0000 Received: by gwb17 with SMTP id 17so3518683gwb.1 for ; Fri, 12 Aug 2011 08:26:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=srR1Azyu/4F8oNkIm5au+IHViBtJCenwjDZ3DQJ068Y=; b=K6mI5LIrFKMh99IP0aBRvkTwq5KmEmVstykaxadRFOuPb2UU7xekytb2IX2Ke5c6cs 4v1firM13rwHXrdmoJxJA838nSFYeQuHI/qkApxo52HHLEUAP8rCLJkw8PeuKwb1rXkK 4nalxmwIPLFvhMi/VW4ps/izDFclowrIEf2sQ= MIME-Version: 1.0 Received: by 10.236.145.68 with SMTP id o44mr3286220yhj.124.1313162811263; Fri, 12 Aug 2011 08:26:51 -0700 (PDT) Sender: justinedelson@gmail.com Received: by 10.236.109.177 with HTTP; Fri, 12 Aug 2011 08:26:51 -0700 (PDT) In-Reply-To: References: <201108121831488122982@163.com> Date: Fri, 12 Aug 2011 11:26:51 -0400 X-Google-Sender-Auth: ttPFFWVomcZYhsAj7TmKMHV5dyc Message-ID: Subject: Re: How to add the same node to many path? From: Justin Edelson To: users@jackrabbit.apache.org Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable JCR 2 added the ability to clone within a workspace. It's referred to as corresponding nodes: http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.10 Corresponding Nodes But I'm not sure that's the right content model. There's not a lot of detail in the original post, but I would suggest using a different pattern for the path (organize by date, user, etc.) and then represent category as a multi-valued property. Justin 2011/8/12 Furst, Carl : > Maybe clone the node? > > I'm assuming that each category is a separate workspace. I'm not sure if = you > could do this if there was any possibility of adding clones to the same > workspace > > > So maybe something like: > > Node n =3D root.addNode("some/path"); > ItemImpl n1 =3D new ItemImpl(); > Node n2 =3D n1.clone(n, n.getName()); > anotherWorkspaceRoot.addNode(n2); > > > HTH, > Carl Furst > > -----Original Message----- > From: =C3=AB=BD=F8 [mailto:danveno@163.com] > Sent: Friday, August 12, 2011 6:32 AM > To: users > Subject: How to add the same node to many path? > > > Hello everyone: > Question One: > i have a need: add one picture node to many categories. The category sys= tem > is stored within Jackrabbit. And i want to add one picuture node to more > than one categories so that this picture node is distinct in the whole > repository. It is different from many picture nodes with the same > metadata. Because, in this case, if i modify one picture node , others ar= e > not modified, which is not i want. > cata--->Pnode > catb--->Pnode > and the Pnode is unique node, not two. > > Question Two: > Now, i use the reference to add a ref node under different categories, wh= ich > can implement this requirement. However, i need to implement full-text > search with category. So, my solution now is USE SQL-2 to join the ref no= de > and the unique node. BUT, it cost too much time to feedback the results. > eg: > SELECT * FROM [resref] as ref left outer join [nt:unstructured] as res o= n > ref.resRef=3Dres.[jcr:uuid] where .... > > > Can anyone give me some suggestion? > > > > 2011-08-12 > > > > =C3=AB=BD=F8 > > > > > > > ********************************************************** > > MLB.com: Where Baseball is Always On > >