jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Cannot get full-text searching to work
Date Tue, 09 Dec 2008 09:11:41 GMT
On Mon, Dec 8, 2008 at 11:13 PM, pkrishna <prabhakar.krishnaswami@ge.com> wrote:
>  String query = "//*[jcr:contains(jcr:content, 'Test')]";
>   String query = "//jcr:content[jcr:contains(., 'Test')]";

The first argument of jcr:contains() is either ".", which refers to
the local node and by default means all properties of the current node
(you can configure that, see the aggregation in [1]), or can be the
name of a property, prefixed with an "@". So your query probably
should look like:

//*[jcr:contains(., 'Test')]

This will give you back all jcr:content nodes. If you want to retrieve
the parent nodes, you can change the aggregation to include the
jcr:content subnode and its properties for your ecr:ecisContentItem
nodes [1].

For the definition of the jcr:contains function, see section 6.6.5.2
of the JCR 1.0 spec [2].

[1] http://wiki.apache.org/jackrabbit/IndexingConfiguration
[2] http://jcp.org/en/jsr/detail?id=170

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message