Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 46270 invoked from network); 26 Aug 2005 08:41:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2005 08:41:11 -0000 Received: (qmail 84461 invoked by uid 500); 26 Aug 2005 08:41:10 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 84448 invoked by uid 99); 26 Aug 2005 08:41:10 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Aug 2005 01:41:09 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 86E6C130 for ; Fri, 26 Aug 2005 10:41:08 +0200 (CEST) Message-ID: <2082818586.1125045668549.JavaMail.jira@ajax.apache.org> Date: Fri, 26 Aug 2005 10:41:08 +0200 (CEST) From: "Marcel Reutegger (JIRA)" To: jackrabbit-dev@incubator.apache.org Subject: [jira] Resolved: (JCR-198) jcr:contains doesn't return incomplete match In-Reply-To: <182342503.1124991488354.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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