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 <[email protected]> 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 >
