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
[...]