Hi Fred,

Fred Eaker wrote:
I am interested in performing fine grain full-text search on text
documents stored in a Jackrabbit repository.

The results I would like to get from the search include the nodes that
the documents are stored in, along with specific information about
where the searched text appears in the document itself.

JSR 170 does not define any methods that deal with highlighting search results. Therefore jackrabbit does not implement such a functionality. But I'm not sure if that's what you are looking for.

For example, if my search for the word "security" hits an XML document
stored in an nt:resource node, I would like to know the xml:id and
xml:lang of of <p> element that the hit resides in.

if your XML document is exploded as document view under the nt:resource node as jcr:data child node you could use the following query:

//p[jcr:contains(jcr:xmltext, 'security')](@xml:id, @xml:lang)

To get this kind of functionality, would a custom QueryHandler need to
be written that indexes and searches that kind of information?

if your XML document is stored as a binary property jcr:data, then you'd probably have to write your own query handler or do some post processing to get the id and lang information.

I have written a Lucene-based program that indexes, searches and
returns the kind of results I am interested in. Would I now need to
incorporate this into Jackrabbit, or is this kind of functionality
possible already?

see above.

regards
 marcel

Reply via email to