jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: Searching binary data
Date Sun, 18 Apr 2010 11:27:22 GMT
On Fri, Apr 16, 2010 at 17:54, Jerry Toddsen <jt6523@gmail.com> wrote:
> I have set the SearchIndex tag in the repository.xml file:

Note: you also have to change the workspace.xml for existing
workspaces if you change the config. However, the default config in
jackrabbit 2.0 should find your documents.

> My query looks like:
>
> final Query q = qm.createQuery("SELECT * from nt:resource WHERE contains (*,
> '*quick brown*')", Query.SQL);

Try this one:

SELECT * from nt:resource WHERE CONTAINS(., 'quick brown')

You need to search for "." which denotes the current node scope. I
think full text extracted from the jcr:data binary property below a
nt:file (fulltext is only extracted for that, not for all binary
properties) is only aggregated on ".", not on the property itself.

Also, you don't need the wildcards in the query term in CONTAINS (unlike LIKE).

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message