From java-user-return-63739-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Wed May 23 08:39:48 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1FC36180645 for ; Wed, 23 May 2018 08:39:47 +0200 (CEST) Received: (qmail 37030 invoked by uid 500); 23 May 2018 06:39:46 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 37017 invoked by uid 99); 23 May 2018 06:39:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 May 2018 06:39:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A4369CA4F2 for ; Wed, 23 May 2018 06:39:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.869 X-Spam-Level: * X-Spam-Status: No, score=1.869 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id homDaC8LYpo3 for ; Wed, 23 May 2018 06:39:44 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 696545F340 for ; Wed, 23 May 2018 06:39:44 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id m129-v6so5895080wmb.3 for ; Tue, 22 May 2018 23:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+Ir5mx92nFg2VNxHCOLyNCvw8A3sLPl8HooMm6/Cvso=; b=rXmqG65hON+/DWbx/Vdj527xAf9x22moxYp8M4+HDUxK73mfS0Yy0eEuWhw1Xwk3+w 13SwNczJTfE/ldYDjXKJStv1+aq0oXWpot5nKyv93Q+guygTbuJeksJuV9I8nsXCajFI HFCFo31hfJWAz6rCYW9tSe9mgEovCG/BTLPKNYrNSYErb5qrZGKcENyxMJaVVQF9xHG4 mkh+eNYJlcS8BXdSWXWZ8w3dtzhds0FRLMPAvBvvCTOxuJjXAZeFZp/KsNNbGETQfxxh 6PsWNiPFZYyqkvEWSekHNqkMgldWMqSBh2x8HDou208CwjQWwN3imD4UrOKpKLArqt33 lbqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+Ir5mx92nFg2VNxHCOLyNCvw8A3sLPl8HooMm6/Cvso=; b=mnZSaRz3mr1c9Dtx0QgodEJPd5v/Qv4QJldLGraca9kikhpzYGoV2WU+zbe2S4Ryzo fMwi8K/f6OGfXqBmq7zW8hrusSqT4eXEF7MTAPxdWLrerndKLXTYtEb3mL0dfbLRR0GC a6faE3lQY65whbDWrcaLxgkq9fcysh3nM0iTTdGKrN4bQruJJpWg7gwpE1MD3f6AmZ2h fzgBvarMx1mJDEEiBQ0OmTNlIFnRJR8H9fK0iffhbzMlbMv6M9JlCSeSG54Z6epH2wsT 0C60boCkYg6rxnC7nBYQpG/r9og7zjxr7rdEGU8NBxHeIR84tK1MInBbb41pMWufWx8T OInQ== X-Gm-Message-State: ALKqPweDz6E4vVDCUeQ9+1RYNjwl9ecpVdAmObU/BVdr/so5r6CWcC2n jNl5RyuiCPmoTPmuGSEovEVeVEsWsmRPICZC5qY= X-Google-Smtp-Source: AB8JxZqvdHqzH/jq80EEv/O1NC/DEV7dQDKbkkjB1fdSlSRYgPdX4W6A29k/7xcl+P68V2uTpPPTJvAzt6frTVHgCjU= X-Received: by 2002:a1c:55c5:: with SMTP id j188-v6mr2986871wmb.102.1527057583022; Tue, 22 May 2018 23:39:43 -0700 (PDT) MIME-Version: 1.0 References: <1638bb619cb.112157cd09919.5320064041070473546@zohocorp.com> In-Reply-To: <1638bb619cb.112157cd09919.5320064041070473546@zohocorp.com> From: Adrien Grand Date: Wed, 23 May 2018 08:39:31 +0200 Message-ID: Subject: Re: Case Insensitive Search for StringField To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary="000000000000c9a9c8056cd9cc12" --000000000000c9a9c8056cd9cc12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Satyan, You need to add a LowercaseTokenFilter to your analysis chain. The way to do it depends on how you are building your analyzer today (pre-built analyzer, extending Analyzer or using CustomAnalyzer). This will preserve the original case in field values because lowercasing will only be applied to the content of the inverted index, not stored fields where hits are fetched from. Le mer. 23 mai 2018 =C3=A0 08:36, Chellasamy G = a =C3=A9crit : > > > Hi, > > > > I can't find any way to perform case insensitive search on StringField. > Please help me out. > > > > > > i.e If the field value is "Flying Robots", then the phrases "flying > robots", "fLying RObots" etc should match the value. > > > > > > I also need the original case of the field value to be preserved in the > search results. > > > > > > Thanks, > > Satyan > > > > --000000000000c9a9c8056cd9cc12--