jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: using nt:file and searching
Date Tue, 20 Feb 2007 08:41:12 GMT
Hi Michael,

Michael Neale wrote:
> I am switching from using a simple string property, to using a nt:file node
> type - I am told that this will open up the repository to tools like web
> dav.
> My question, is this a bad thing to do with 90% of the time my data is
> textual? are there any text searching implications ?

you will have to adjust the queries because the text data moves down one level 
into the nt:resource node of an nt:file.

//element(*, my:doc)[jcr:contains(., 'michael')]

after switching to my:doc extends nt:file:
//element(*, my:doc)[jcr:contains(jcr:content, 'michael')]

there are also some implications on the operators if you move your text into a 
binary property. you cannot use operators on a binary property (=, <, >, etc.). 
the same applies to jcr:like().

E.g. the following query using a string property cannot be translated into a 
query that does a jcr:like() on the binary property of a nt:resource node:
//element(*, my:doc)[jcr:like(@my:text, 'Once upon a time %')]


View raw message