jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaka Jaksic" <jaka.jak...@telemach.net>
Subject Searching linked files
Date Wed, 01 Nov 2006 17:49:22 GMT
Hi!

I wasn't able to find any info on this, although it seems quite basic... How
do I do a full text search of linked files? I can search the nt:resource
nodes, but I'd like the query to return a set of nt:linkedFile nodes (the
actual files, not their content nodes), whose referenced nt:resource nodes
match the search criteria.

I expected one of the following would work:

//element(*, nt:linkedFile)[jcr:contains(@jcr:content, 'search string')]
//element(*, nt:linkedFile)[jcr:contains(jcr:deref(@jcr:content, '*'),
'search string')]
//element(*, nt:linkedFile)[jcr:deref(@jcr:content, '*')/jcr:contains(.,
'search string')]

But nothing seems to work.

One possible solution would be to search the resource nodes, then manually
call getReferences() on each returned node etc., but this would require a
lot of roundtripping and I would feel like I'm reinventing the wheel...

Is there a *proper* solution to this problem?

Thanks,
Jaka


Mime
View raw message