jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu ☀" <the.mindstorm.mailingl...@gmail.com>
Subject Re: Is jcr:contains supported only for text/plain type content?
Date Tue, 08 May 2007 09:16:20 GMT
On 5/7/07, Nithya Mani <nithya@webmethods.com> wrote:
> Hi,
> I have added an xsd file as binary property value. The node structure I
> followed is,
> /Schema (nt:file)
>         /jcr:content (nt:resource)
>                 -jcr:mimetype (text/xsd)
>                 -jcr:lastModified
>                 -jcr:data (sample.xsd which contains a line
> <xsd:simpleType name="uddiKey" scc14n:caseMapKind="fold">)
> I tried to make contains search on this file using the following query,
> /jcr:root/Schema//element(*, nt:resource)[jcr:contains(.,
> '*caseMapKind*')]
> It returns none. If I neglect the contains part
> {/jcr:root/Schema//element(*, nt:resource)}, it works fine. The same
> query with contains works, if I set mime type as text/plain and
> partially works on text/xml type file. Does jcr:contains not supported
> for all mime types? Is it applicable only for text/plain?

According to the spec:

Support for the jcr:contains() (CONTAINS() in SQL) function is
not required for any property types in particular. It is however
required to work at the node level. In that case it applies to those
properties of the node for which the implementation maintains an
index. Which properties those are is an implementation issue. See jcr:contains Function and CONTAINS.

So, most probably in your case you haven't configured any other text
indexers so that the content of your xsd is indexed.

.w( the_mindstorm )p.
  Alexandru Popescu, OSS Evangelist
  Information Queue ~ www.InfoQ.com

> Thanks,
> Nithya Mani
> Senior Developer
> webMethods
>         Mobile: 9841825337
> Email: nithya@webmethods.com
> IM: nithya_infravio (Yahoo)

View raw message