jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (JCR-198) jcr:contains doesn't return incomplete match
Date Fri, 26 Aug 2005 08:41:08 GMT
     [ http://issues.apache.org/jira/browse/JCR-198?page=all ]
     
Marcel Reutegger resolved JCR-198:
----------------------------------

    Resolution: Invalid

jcr:contains in XPath and CONTAINS in SQL respectively are fulltext extensions to the two
languages. The specification is not very strict on what exactly is supported. It merely defines
the fulltext syntax that can be used in the contains function. Whether a term matches also
a substring is not specified.

It is certainly possible to change the jackrabbit implementation that jcr:contains will also
match substrings. However, I'm not sure if that is a good idea. E.g. if you search for 'bi'
on google you don't get whatever starts with 'bi'.

What Jackrabbit already supports are wildcards in the jcr:contains function.

To make your query work you can use:
//*[jcr:contains(., 'bi*')]

which will match everything that starts with 'bi' or 'bi' itself.

or use:
//*[jcr:contains(., 'bi?')]

which will match any 3 letter word that starts with 'bi'

Keep in mind that this is not standardized and will probably not work on other implementations.

> jcr:contains doesn't return incomplete match
> --------------------------------------------
>
>          Key: JCR-198
>          URL: http://issues.apache.org/jira/browse/JCR-198
>      Project: Jackrabbit
>         Type: Bug
>   Components: query
>     Reporter: Bertrand Lega

>
> This behaviour is very strange. 
> I have the following repository : 
>    ... 
>    + [node] mynode
>         [prop] title = "my big title"
> the following query doesn't return any node : //*[jcr:contains(@title, "bi")] wherea
> revision : 234496

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message