lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward W. Rouse" <ero...@comsquared.com>
Subject RE: short search terms
Date Wed, 26 Sep 2012 21:16:47 GMT
Sorry, I rarely work with Lucene and so far my requirements have been very
basic. I thought there would be a simple setting to override the default
minimum string length of 4 for a search string. It sounds like this isn't
possible and the only way is to recode the QueryParser and create a custom
Query?

> -----Original Message-----
> From: Arjen van der Meijden [mailto:acmmailing@tweakers.net]
> Sent: Wednesday, September 26, 2012 5:04 PM
> To: java-user@lucene.apache.org
> Subject: Re: short search terms
> 
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message