Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70062D3D0 for ; Wed, 26 Sep 2012 21:04:51 +0000 (UTC) Received: (qmail 57365 invoked by uid 500); 26 Sep 2012 21:04:49 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 57150 invoked by uid 500); 26 Sep 2012 21:04:49 -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 57141 invoked by uid 99); 26 Sep 2012 21:04:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 21:04:49 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.239.154.11] (HELO adonis.tweakers.net) (213.239.154.11) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Sep 2012 21:04:41 +0000 Received: from [192.168.0.15] (h101063.upc-h.chello.nl [62.194.101.63]) by adonis.tweakers.net (Postfix) with ESMTPSA id 9FA6DF40018 for ; Wed, 26 Sep 2012 23:04:18 +0200 (CEST) Message-ID: <50636DD6.5040603@tweakers.net> Date: Wed, 26 Sep 2012 23:04:22 +0200 From: Arjen van der Meijden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: short search terms References: <038a01cd9c28$14b65150$3e22f3f0$@com> In-Reply-To: <038a01cd9c28$14b65150$3e22f3f0$@com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Shouldn't your own application-logic handle this? Or do you want complicated query-parsing where each and every token in the query is always at most 3 characters long? I don't know if there are any easier solutions, but you could subclass the QueryParser and add your requirement to all the relevant Query factory-methods. Best regards, Arjen On 26-9-2012 22:47 Edward W. Rouse wrote: > I have a key field that will only ever have a length of 3 characters. I am > using a StandardAnalyzer and a QueryParser to create the Query > (parser.parse(string)), and an IndexReader and IndexSearcher to execute the > query (searcher(query)). I can't seem to find a setter to allow for a 3 > character search string. There is one setMinWordLen, but it isn't applicable > here. I did see a TokenStream LengthFilter, but can't figure out if I can > apply it in this case. > > How do I set Lucene to allow for results from short search strings? > > Edward W. Rouse > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org