Return-Path: X-Original-To: apmail-jackrabbit-users-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BD0E7D02A for ; Thu, 6 Dec 2012 15:43:37 +0000 (UTC) Received: (qmail 6030 invoked by uid 500); 6 Dec 2012 15:43:37 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 5936 invoked by uid 500); 6 Dec 2012 15:43:36 -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 5928 invoked by uid 99); 6 Dec 2012 15:43:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 15:43:36 +0000 X-ASF-Spam-Status: No, hits=1.0 required=5.0 tests=FRT_ADOBE2,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [194.1.211.22] (HELO smtp-gw.artificial-solutions.com) (194.1.211.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 15:43:27 +0000 Received: from webmail.artificial-solutions.com (unknown [192.168.106.11]) by smtp-gw.artificial-solutions.com (Postfix) with ESMTP id 924C05508 for ; Thu, 6 Dec 2012 16:43:06 +0100 (CET) Received: from EXCHANGE2.artificial-solutions.com ([192.168.106.6]) by webmail.artificial-solutions.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 6 Dec 2012 16:43:07 +0100 Received: from EXCHANGE.artificial-solutions.com ([fe80::dca8:a0ea:ca7f:5b3]) by exchange2.artificial-solutions.com ([fe80::d16c:8a1d:4053:d26b%13]) with mapi id 14.01.0421.002; Thu, 6 Dec 2012 16:43:05 +0100 From: Robert Haycock To: "users@jackrabbit.apache.org" Subject: RE: How to make indexing case insensitive Thread-Topic: How to make indexing case insensitive Thread-Index: Ac3TteUh5NUjyqs4SAa4ChXjg3gUsgADMb3AAAFjnmA= Date: Thu, 6 Dec 2012 15:43:47 +0000 Message-ID: <565B17AF7325C54B83DFBD01450462DADCDE@EXCHANGE.artificial-solutions.com> References: <565B17AF7325C54B83DFBD01450462DADC41@EXCHANGE.artificial-solutions.com> <9C0FC4C8E9C29945B01766FC7F9D389817293D54F3@eurmbx01.eur.adobe.com> In-Reply-To: <9C0FC4C8E9C29945B01766FC7F9D389817293D54F3@eurmbx01.eur.adobe.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.36.36.12] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 06 Dec 2012 15:43:07.0410 (UTC) FILETIME=[63280720:01CDD3C8] X-Virus-Checked: Checked by ClamAV on apache.org That explains it. I thought the analyzer was also used for indexing, from m= y Lucene days. Thanks. -----Original Message----- From: Marcel Reutegger [mailto:mreutegg@adobe.com]=20 Sent: 06 December 2012 15:06 To: users@jackrabbit.apache.org Subject: RE: How to make indexing case insensitive Hi, the analyzer is only used for fulltext query statements within a CONTAINS() in SQL or jcr:contains() in XPath. in your case you should rather use the built-in upper and lower case functi= ons available in Jackrabbit. See the corresponding JIRA issue for a number = of example queries: https://issues.apache.org/jira/browse/JCR-638 Regards Marcel > -----Original Message----- > From: Robert Haycock [mailto:Robert.Haycock@artificial-solutions.com] > Sent: Donnerstag, 6. Dezember 2012 14:40 > To: users@jackrabbit.apache.org > Subject: How to make indexing case insensitive >=20 > Hi, >=20 > We have created our custom analyser and set the analyzer param in the=20 > workspace.xml... > public class LowerCaseAnalyzer extends Analyzer { >=20 > @Override > public TokenStream tokenStream(String fieldName, Reader reader) { > TokenStream stream =3D new LetterTokenizer(reader); > stream =3D new LowerCaseFilter(stream); > return stream; > } > } > And when I debug I can see it is being hit and tokens being converted=20 > to lowercase. > On a node I have a property called "name" with value "FLOW". Problem=20 > is, when I do a JCR2 SQL search the sql "WHERE name =3D 'FLOW'" returns=20 > the node but "WHERE name =3D 'flow'" doesn't. This is not what I expected= . > My assumption was that the LowerCaseFilter would convert all text to=20 > lower case before being indexed. > Is my assumption wrong? How should I tell Jackrabbit to index=20 > everything as lower case so when I search I can convert all my search ter= ms to lower case? >=20 > Thanks, >=20 > Rob.