Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 94981 invoked from network); 11 May 2006 09:48:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 May 2006 09:48:56 -0000 Received: (qmail 14020 invoked by uid 500); 11 May 2006 09:48:55 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 13992 invoked by uid 500); 11 May 2006 09:48:54 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 13983 invoked by uid 99); 11 May 2006 09:48:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2006 02:48:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of marcel.reutegger@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 11 May 2006 02:48:54 -0700 Received: (qmail invoked by alias); 11 May 2006 09:48:31 -0000 Received: from bsl-rtr.day.com (EHLO [10.0.0.77]) [212.249.34.130] by mail.gmx.net (mp040) with SMTP; 11 May 2006 11:48:31 +0200 X-Authenticated: #894343 Message-ID: <44630869.1000908@gmx.net> Date: Thu, 11 May 2006 11:48:25 +0200 From: Marcel Reutegger User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: Restricting xpath query to document text References: <4102828.post@talk.nabble.com> <44508BB4.8010307@gmx.net> <4320864.post@talk.nabble.com> In-Reply-To: <4320864.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N thomasg wrote: > Hi Marcel, > > I've just been looking at a some more typical queries that our system will > need to run and am finding a (related) but more serious problem using > jcr:like. > A query such as this works fine: > String queryString = "//element(*, axxia:resource)[jcr:like(@axxia:title, > '%inking%Java%')]"; > > But how can you specify that you want the document text to be like > '%inking%Java%'? Is it currently the case that jcr:like can only search > properties and not the document text? Yes, in JSR-170 the jcr:like() function is specified to only work on String properties. And I think this makes sense, because a like operation on a potentially large text which is not tokenized may be quite expensive. you should then rather use jcr:contains which also works on fulltext indexed binary properties. > Using jcr:contains the situation is ok since jcr:contains(., 'word') > searches the document text, even though you can't specify 'ONLY the document > text and not other properties'. I think this is a reasonable extension that we should consider in jackrabbit. it is tracked with this issue: http://issues.apache.org/jira/browse/JCR-415 regards marcel