jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Custom node or mixin added to existing node
Date Fri, 09 Oct 2009 15:55:08 GMT
On Fri, Oct 9, 2009 at 16:20, Michael Shoener <mshoener@softwareapps.net> wrote:
> But the problem with the following query:
>
>        //element(*,hfs:fileInfo)[jcr:contains(., 'testing') or
> jcr:contains(@hfs:description, 'testing')]
>
> Is that is searches on the entire node, not just the file contents and my
> specified property.  I would like to only search on specific properties and
> the file contents, not the entire node. I would like to keep the meta data
> separate from the actual file contents. So do I create a mixin and add that
> to the "nt:file" parent node of the "nt:resource" node that holds the actual
> binary file data? If so then do I query against my custom mixin type?

This query assumes the mixin to be set on the jcr:content node (with
primary resource type nt:resource), as you noted for your first query.

> Also, I thought in order to have the property returned, whether it contained
> the term being searched or not, I had to put the /(hfs:description |
> hfs:anotherpropertyname) at the end of the query. Is that incorrect then?

The result always consists of the full node. Just specifying the
property you'll access doesn't make it faster.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message