Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 23751 invoked from network); 12 Dec 2006 10:33:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2006 10:33:42 -0000 Received: (qmail 41253 invoked by uid 500); 12 Dec 2006 10:33:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 41240 invoked by uid 500); 12 Dec 2006 10:33:49 -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 41224 invoked by uid 99); 12 Dec 2006 10:33:49 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 02:33:49 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [213.173.174.7] (HELO mail.obinary.com) (213.173.174.7) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Dec 2006 02:33:38 -0800 Received: from [213.158.149.52] (account me@thomas-martin.ch HELO [192.168.0.4]) by mail.obinary.com (CommuniGate Pro SMTP 5.1.3) with ESMTPA id 5218521 for users@jackrabbit.apache.org; Tue, 12 Dec 2006 11:30:47 +0100 Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: users@jackrabbit.apache.org From: Thomas Martin Subject: SQL search in various paths Date: Tue, 12 Dec 2006 11:33:11 +0100 X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Dear Experts I have stored different product informations in one base path but different children paths. What I am trying to achieve (but alas failing miserably) is to combine the following two queries: "SELECT * FROM nt:base where jcr:path like '"+productPage+"/%/color/ %/' and key like '"+colorSearch+"'" "SELECT * FROM nt:base where jcr:path like '"+productPage+"/%/ material/%' and key like '"+materialSearch+"'" so the result set would only include nodes that have _both_ information stored in the corresponding nodes. I know my question might be vague but I still hope someone can give me some guidance on how to obtain a solution to my most certainly (in the eye of the expert) trivial problem. Many thanks for your help! Regards, Thomas