Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 40664 invoked from network); 2 Nov 2009 15:04:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Nov 2009 15:04:46 -0000 Received: (qmail 7728 invoked by uid 500); 2 Nov 2009 15:04:45 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 7675 invoked by uid 500); 2 Nov 2009 15:04:45 -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 7663 invoked by uid 99); 2 Nov 2009 15:04:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2009 15:04:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tmueller@day.com designates 207.126.148.88 as permitted sender) Received: from [207.126.148.88] (HELO eu3sys201aog102.obsmtp.com) (207.126.148.88) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 02 Nov 2009 15:04:35 +0000 Received: from source ([209.85.222.181]) by eu3sys201aob102.postini.com ([207.126.154.11]) with SMTP ID DSNKSu707rRcz4eOlcBbyZJCv3nmUN71eY5C@postini.com; Mon, 02 Nov 2009 15:04:15 UTC Received: by pzk11 with SMTP id 11so3164465pzk.14 for ; Mon, 02 Nov 2009 07:04:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.247.21 with SMTP id u21mr266374rvh.3.1257174254004; Mon, 02 Nov 2009 07:04:14 -0800 (PST) In-Reply-To: <442569030911020628g20746680ob8978bf5a9360c6c@mail.gmail.com> References: <442569030911020628g20746680ob8978bf5a9360c6c@mail.gmail.com> Date: Mon, 2 Nov 2009 16:04:13 +0100 Message-ID: <91f3b2650911020704x11d4d3c2y25bf322379d08da8@mail.gmail.com> Subject: Re: BindVariable in JCR-SQL2 CONTAINS From: =?ISO-8859-1?Q?Thomas_M=FCller?= To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm not sure, but it looks like a bug in Jackrabbit. The statement seems to be parsed correctly, but extracting the bind variables doesn't pick it up. Could you file a Jira bug report please? Just copy & paste the example code below, that's enough to reproduce the issue. Regards, Thomas On Mon, Nov 2, 2009 at 3:28 PM, Philipp Bunge wrote: > Hi > > I'm trying to use the following FullTextSearch query in Jackrabbit 2.0 beta1: > Query query = qm.createQuery("SELECT * FROM [my:document] AS document > WHERE CONTAINS(document.original, $x)", Query.JCR_SQL2); > > But the following fails with a "java.lang.IllegalArgumentException: > not a valid variable in this query:" > query.bindVariable("x", vf.createValue("moo")); > > In fact, query.getBindVariableNames() returns an empty array. > > Did I miss something? > > Thanks in advance, > Philipp >