Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1
-
None
-
None
-
JCR via DavEx
Description
When using Jackrabbit JCR via DavEx (not RMI) and doing an fulltext-search xpath query including excerpt of the found text parts.
I am using the following code to test a fulltext search query for term "jackrabbit":
----------------------------------------- test function start ------------------------------------
public void doFulltextSearchTest() {
try {
System.out.println("found:");
RowIterator rows = queryFulltextSearch("kanzlei");
for (RowIterator it = rows; it.hasNext()
} catch (ItemNotFoundException e)
{ e.printStackTrace(); } catch (RepositoryException e) { e.printStackTrace(); }}
public RowIterator queryFulltextSearch(String searchstring) throws RepositoryException
{ QueryManager qm = currentSession.getWorkspace().getQueryManager(); Query q = qm.createQuery("//*[jcr:contains(., '"+searchstring+"')]/(@Title|rep:excerpt(.))", Query.XPATH); QueryResult result = q.execute(); return result.getRows(); }----------------------------------------- test function end------------------------------------
---------------------------- causes Exception start --------------------------------------
javax.jcr.ItemNotFoundException: rep:excerpt(.)
at org.apache.jackrabbit.jcr2spi.query.RowIteratorImpl$RowImpl.getValue(RowIteratorImpl.java:271)
at consearch.demos.jcr.FulltextSearchTest.<init>(FulltextSearchTest.java:44)
at consearch.demos.jcr.FulltextSearchTest.main(FulltextSearchTest.java:61)
---------------------------- causes Exception end --------------------------------------
I guess that excerpt is a major feature when getting WebDav in a full featured state