You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Roy Russo <ro...@jboss.com> on 2006/09/02 01:18:56 UTC

Searching binary data

Hello folks,
 
Running in to a problem when searching jcr:data types...
 
"select * from portalcms:content where jcr:data like '%JBoss%'";
"select * from portalcms:content where jcr:data is not null";
 
None of the above SQL queries return anything, yet operations on other
properties of portalcms:content are returning results. Is there a
recommended way of searching jcr:data types?
 
STAY METAL!
Roy Russo
Grand Ayatollah, JBoss Portal
JBoss, a division of Red Hat
 

Re: Searching binary data

Posted by David Nuescheler <da...@gmail.com>.
Hi Roy,

first of all I think this is rather a post for the user list
than the dev list of Jackrabbit.

On 9/2/06, Roy Russo <ro...@jboss.com> wrote:
> Running in to a problem when searching jcr:data types...
>
> "select * from portalcms:content where jcr:data like '%JBoss%'";

I assume that in your example you want to issue
a fulltext search looking for "JBoss", correct?

So your query should look like this:

select * from nt:resource where contains(*,'JBoss')

See page 296: 8.5.4.5 CONTAINS
of the JCR v1.0 spec

regards,
david