From users-return-12782-apmail-jackrabbit-users-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Sep 24 20:25:34 2009 Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 85046 invoked from network); 24 Sep 2009 20:25:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Sep 2009 20:25:34 -0000 Received: (qmail 47502 invoked by uid 500); 24 Sep 2009 20:25:33 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 47461 invoked by uid 500); 24 Sep 2009 20:25:33 -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 47450 invoked by uid 99); 24 Sep 2009 20:25:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Sep 2009 20:25:33 +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 aklimets@day.com designates 207.126.148.89 as permitted sender) Received: from [207.126.148.89] (HELO eu3sys201aog103.obsmtp.com) (207.126.148.89) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 24 Sep 2009 20:25:23 +0000 Received: from source ([209.85.220.221]) by eu3sys201aob103.postini.com ([207.126.154.11]) with SMTP ID DSNKSrvVnTmrqh3cALMbnpni/IG84F5E+Xpx@postini.com; Thu, 24 Sep 2009 20:25:02 UTC Received: by fxm21 with SMTP id 21so1652047fxm.33 for ; Thu, 24 Sep 2009 13:25:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.22.133 with SMTP id n5mr1546315fab.16.1253823901603; Thu, 24 Sep 2009 13:25:01 -0700 (PDT) In-Reply-To: <213347022AC24F3D973BB1C30B6C5D13@Dell2> References: <213347022AC24F3D973BB1C30B6C5D13@Dell2> Date: Thu, 24 Sep 2009 22:25:01 +0200 Message-ID: Subject: Re: Search file content but not all node properties From: Alexander Klimetschek To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Sep 24, 2009 at 18:39, Michael Shoener wrote: > I have the following query: > > //element(*, hfs:fileInfo)[jcr:contains(., 'search term') or > jcr:contains(@hfs:description, 'search term')]/(@hfs:description) > > It returns all documents that have the 'search term' contained in either a > the description property, the content of the file, but it also searches all > other property values. > > What I want is to search only the content and my specified property > (description), but leave out documents that happen to have the 'search term' > in another property. What do you mean by content? I guess not the "." in jcr:contains(., 'search term') as this covers the whole node (and whatever the indexing considered as full text for the whole node. If you want the content of the binary stream and your node is like nt:file/nt:resource, I suggest to use jcr:contains(jcr:data, 'search term') as that property contains the binary data in case of a nt:resource. Regards, Alex -- Alexander Klimetschek alexander.klimetschek@day.com