jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: How Can I catch the "excerpt" value from highlighting?
Date Tue, 14 Aug 2007 09:49:24 GMT
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
[...]

Mime
View raw message