Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 73685 invoked from network); 30 Aug 2007 20:24:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Aug 2007 20:24:51 -0000 Received: (qmail 87608 invoked by uid 500); 30 Aug 2007 20:24:41 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 87563 invoked by uid 500); 30 Aug 2007 20:24:40 -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 87552 invoked by uid 99); 30 Aug 2007 20:24:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 13:24:40 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [208.97.132.177] (HELO spunkymail-a19.g.dreamhost.com) (208.97.132.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2007 20:25:35 +0000 Received: from [192.168.0.3] (adsl-074-229-189-244.sip.rmo.bellsouth.net [74.229.189.244]) by spunkymail-a19.g.dreamhost.com (Postfix) with ESMTP id E188D11B7F for ; Thu, 30 Aug 2007 13:24:12 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <295da8fe0708300306l34362e98p9090e794913ec5a2@mail.gmail.com> References: <295da8fe0708300306l34362e98p9090e794913ec5a2@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <04E5B8CE-FB1A-4BB2-B635-486D9C5C62C7@apache.org> Content-Transfer-Encoding: 7bit From: Grant Ingersoll Subject: Re: unable to search from a string containing numbers seperated by comma. Date: Thu, 30 Aug 2007 16:24:09 -0400 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org Give these tips a try to see if they help: http://wiki.apache.org/lucene-java/ LuceneFAQ#head-3558e5121806fb4fce80fc022d889484a9248b71 Luke is your friend. Cheers, Grant On Aug 30, 2007, at 6:06 AM, prabin meitei wrote: > Hi, > I am trying to search from an idlist (string containing comma > seperated > numeric values) > > eg: > QueryParser vParser = new QueryParser("idlist", new AlphanumAnalyzer > ()); // > analyzer using custom lettertokenizer which tokenize nuber also. > class is > given below. > Query q = vParser.parse("55"); // example > > now even if the field idlist contains say (44, 55, 66) > my search returns 0 hit. is there any alternative solution or is > there some > problem with wat i am using. > > Thanks in advance. > > public class AlphanumericTokenizer extends LetterTokenizer { > public AlphanumericTokenizer(Reader reader) { > super(reader); > } > > protected boolean isTokenChar(char c) { > return super.isTokenChar(c) || Character.isDigit(c); > } > } -------------------------- Grant Ingersoll http://lucene.grantingersoll.com Lucene Helpful Hints: http://wiki.apache.org/lucene-java/BasicsOfPerformance http://wiki.apache.org/lucene-java/LuceneFAQ --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org