Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 22699 invoked from network); 12 Apr 2011 00:00:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 00:00:04 -0000 Received: (qmail 13193 invoked by uid 500); 12 Apr 2011 00:00:01 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 13155 invoked by uid 500); 12 Apr 2011 00:00:01 -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 Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 53790 invoked by uid 99); 11 Apr 2011 08:48:16 -0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mentalmantle@hotmail.com designates 65.55.111.79 as permitted sender) X-Originating-IP: [77.246.171.42] X-Originating-Email: [mentalmantle@hotmail.com] Message-ID: From: "Chris Mantle" To: Subject: Can't perform exact match...? Date: Mon, 11 Apr 2011 09:47:39 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0117_01CBF82D.7EEA6B60" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 15.4.3508.1109 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3508.1109 X-OriginalArrivalTime: 11 Apr 2011 08:47:41.0280 (UTC) FILETIME=[1E1BAE00:01CBF825] X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_0117_01CBF82D.7EEA6B60 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I=E2=80=99m having some trouble with Lucene at the moment. I have a = number of unique identifiers that I need to search through. = They=E2=80=99re in many different forms, eg. =E2=80=9CM=E2=80=9D, = =E2=80=9CMO=E2=80=9D, =E2=80=9C:MOFB=E2=80=9D, = =E2=80=9CFH..L-O=E2=80=9D, etc. All I need to do is an exact prefix = search: at the moment, if I type in =E2=80=98M=E2=80=99, I get = =E2=80=9CM=E2=80=9D, =E2=80=9CMO=E2=80=9D and =E2=80=9C:MOFB=E2=80=9D, = and I=E2=80=99d like to avoid getting =E2=80=9C:MOFB=E2=80=9D until the = user actually types in =E2=80=98:M=E2=80=99. This is with a StandardAnalyzer and a PrefixQuery. I=E2=80=99ve tried = many different combinations of analyzer and query. If I use a = WhitespaceAnalyzer or a KeywordAnalyzer, I see that tokens are generated = in a form that I=E2=80=99d expect (=E2=80=9C:MOFB=E2=80=9D instead of = =E2=80=9Cmofb=E2=80=9D, for instance), but I can=E2=80=99t search with a = wildcard: searching with =E2=80=98M*=E2=80=99 returns nothing; = =E2=80=98M=E2=80=99 returns =E2=80=9CM=E2=80=9D alone. I=E2=80=99ve also = tried using ANALYSED and NOT_ANALYSED indexing to no avail. Can anyone advise me on how to remedy this? There must be something = I=E2=80=99m missing here... Thanks, - Chris M. ------=_NextPart_000_0117_01CBF82D.7EEA6B60--