Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 59870 invoked from network); 14 Aug 2007 14:55:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Aug 2007 14:55:27 -0000 Received: (qmail 6293 invoked by uid 500); 14 Aug 2007 14:55:25 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 6101 invoked by uid 500); 14 Aug 2007 14:55:25 -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 6091 invoked by uid 99); 14 Aug 2007 14:55:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 07:55:24 -0700 X-ASF-Spam-Status: No, hits=3.7 required=10.0 tests=DNS_FROM_OPENWHOIS,FORGED_HOTMAIL_RCVD2,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Aug 2007 14:55:34 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IKxnP-0006pY-Aw for users@jackrabbit.apache.org; Tue, 14 Aug 2007 07:54:59 -0700 Message-ID: <12146100.post@talk.nabble.com> Date: Tue, 14 Aug 2007 07:54:59 -0700 (PDT) From: bilobag To: users@jackrabbit.apache.org Subject: Re: How Can I catch the "excerpt" value from highlighting? In-Reply-To: <46C17AA4.2060107@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: bilobag@hotmail.com References: <9773d7dd0705080439h69125b4cse3b9f1c2948ac9f9@mail.gmail.com> <464173DE.4090807@gmx.net> <12093126.post@talk.nabble.com> <46C17AA4.2060107@gmx.net> X-Virus-Checked: Checked by ClamAV on apache.org Well I found that in the xpath query, it doesn't matter if I add the period or not. I do get an excerpt to return, but it is an empty excerpt. Also, when I call row.getValue("rep:excerpt()").getString(), I get an exception: javax.jcr.ItemNotFoundException: rep:excerpt(.). So I can use the period in the query (period doesn't make a difference) but I can't use it to get the row value. It looks like it queries correctly by returning the cwe:file nodes that have 'apple' in it, but it doesn't return the excerpt it finds. Any ideas why that might be. I'm using jackrabbit 1.3.1 and I have re-indexed my repository with the text extractors installed properly. Marcel Reutegger wrote: > > bilobag wrote: >> Hi, I am having an issue getting my query to return the excerpt from a >> binary >> file. The following is the query i'm using: >> >> query: >> "//*[(@jcr:primaryType = 'cwe:file') and jcr:contains(jcr:content, >> 'apple')]/rep:excerpt() order by @jcr:score desc" > > if you change rep:excerpt() to rep:excerpt(.) it should work. > > regards > marcel > >> java: >> RowIterator rowIter = qresult.getRows(); >> String[] columns = qresult.getColumnNames(); >> >> while(rowIter.hasNext()) { >> Row row = rowIter.nextRow(); >> log.debug("**********text excerpt=" + >> row.getValue("rep:excerpt(.)").getString()); >> } >> >> >> output: >> >> javax.jcr.ItemNotFoundException: rep:excerpt(.) >> at >> org.apache.jackrabbit.core.query.lucene.RowIteratorImpl$RowImpl.getValue(RowIteratorImpl.java:291) >> at > [...] > > -- View this message in context: http://www.nabble.com/How-Can-I-catch-the-%22excerpt%22-value-from-highlighting--tf3709100.html#a12146100 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.