lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: sloppyFreq - why on Similarity?
Date Tue, 30 Sep 2003 04:51:31 GMT
On Monday, September 29, 2003, at 11:26  PM, Erik Hatcher wrote:
> On Monday, September 29, 2003, at 04:56  PM, Doug Cutting wrote:
>> As a start, we could add parameters to the query parser to disable 
>> these features.  If we disable them by default then lots of people 
>> will howl: they're popular features.  Perhaps in a future major 
>> release they could be disabled by default, but, for now, I think it 
>> would at least be good to be able to disable them.
>
> I haven't actually tried this yet, but I suspect one could subclass 
> QueryParser and override the factory methods for creating fuzzy and 
> wildcard queries to effectively disable them.  Although I suspect 
> adding a 'throws ParseException' clause should be added to those 
> factory getters to allow subclasses to reject.  Or maybe returning 
> null is sufficient?
>
> I will likely try this out soon and document this along with 
> QueryParser somehow.  I'm hesitant to tinker with QueryParser and add 
> more bells and whistles - its got more than its fair share of them 
> already.

Well, I hate to leave things hanging, so I went ahead and prototyped a 
QueryParser subclass to see how it could reject fuzzy and wildcard 
queries.  Thankfully the factory methods were added, and all that was 
needed was to add the throws clause to each of those methods which 
makes general good sense anyway.

	Erik


Mime
View raw message