jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: About jcr:contains for binary content and properties
Date Thu, 09 Sep 2010 14:56:43 GMT
On Thu, Sep 9, 2010 at 2:43 PM, Paco Avila <monkiki@gmail.com> wrote:
> In the Jackrabbit FAQ I see this question:
>
> Why doesn't //*[jcr:contains(@jcr:data, 'foo')] return matches for
> binary content? Extracted text from binary content is only indexed on
> the parent node of the @jcr:data property. Use jcr:contains() on the
> nt:resource node.
>
> My problem in that this query:
>
> //element(*, nt:file)[jcr:contains(jcr:content, 'foo')]
>
> will also match jcr:content nodes with the 'foo' text in their
> properties. For example, if I want to find document with the word
> "pdf" inside, will also match documents which jcr:mimeType is
> 'application/pdf'.
>
> How can I search only by the binary indexed data?

You would need to hook into the indexing then. I answered a similar
question somewhere around 2 weeks ago. You should be able to find this
back in the archive.

Regards Ard

> --
> OpenKM
> http://www.openkm.com
> http://www.guia-ubuntu.org
>

Mime
View raw message