Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 50339 invoked from network); 4 Aug 2008 13:19:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 13:19:52 -0000 Received: (qmail 77785 invoked by uid 500); 4 Aug 2008 13:19:49 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 77769 invoked by uid 500); 4 Aug 2008 13:19:49 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 77758 invoked by uid 99); 4 Aug 2008 13:19:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 06:19:49 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [84.14.163.131] (HELO trinity.anyware-tech.com) (84.14.163.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 13:18:54 +0000 Received: from localhost (localhost [127.0.0.1]) by trinity.anyware-tech.com (Postfix) with ESMTP id A107D400DDD for ; Mon, 4 Aug 2008 15:18:49 +0200 (CEST) Received: from trinity.anyware-tech.com ([127.0.0.1]) by localhost (trinity.anyware-tech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26890-04 for ; Mon, 4 Aug 2008 15:18:44 +0200 (CEST) Received: from [10.0.1.122] (krusty.anyware [10.0.1.122]) by trinity.anyware-tech.com (Postfix) with ESMTP id 26D6F400053 for ; Mon, 4 Aug 2008 15:18:44 +0200 (CEST) Message-ID: <489701CE.1040803@anyware-tech.com> Date: Mon, 04 Aug 2008 15:19:10 +0200 From: =?ISO-8859-1?Q?S=E9bastien_Launay?= User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Re: Simple question about jcr:contains() References: <8f70390808040548q3cc0a550l81e63a0f3b67a48e@mail.gmail.com> In-Reply-To: <8f70390808040548q3cc0a550l81e63a0f3b67a48e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Debian amavisd-new at anyware-tech.com X-Virus-Checked: Checked by ClamAV on apache.org Hi Paco, I think the Lucene analyzer used in your workspace and defined in repository.xml does not tokenize string as you wanted. Indeed, the default analyzer is Lucene StandardAnalyzer [1] which used Lucene StandardTokenizer [2] which claims to: "Splits words at punctuation characters, removing punctuation. However, a dot that's not followed by whitespace is considered part of a token." You can still use a custom analyzer by setting the class name to use in the property "analyzer" of the SearchIndex element in repository.xml. If the workspace is already created, you need to update repository/workspaces//workspace.xml and also delete the repository/workspaces//index directory in order to reindex nodes at startup. [1] http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/analysis/standard/StandardAnalyzer.html [2] http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/analysis/standard/StandardTokenizer.html -- S�bastien Launay Paco Avila a �crit : > I've a property called "okm:name" where I store each document name. If the > document is called "hola mundo.txt" why the query > > /jcr:root//*[jcr:contains(@okm:name, 'hola')] > > return the document node but: > > /jcr:root//*[jcr:contains(@okm:name, 'mundo')] > > does not return anything? > >