lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Goller <>
Subject Re: QueryParser and backwards-compatibility
Date Mon, 11 Oct 2004 08:31:42 GMT
Erik Hatcher schrieb:
> On Oct 10, 2004, at 9:56 AM, Erik Hatcher wrote:
>> Also, I found another signature change for getFuzzyQuery which broke 
>> another custom QueryParser subclass of mine.  :(
> More on this, from CHANGES.txt:
>  2. FuzzyQuery now takes an additional parameter that specifies the
>     minimum similarity that is required for a term to match the query.
>     The QueryParser syntax for this is term~x, where x is a floating
>     point number between 0 and 1 (a bigger number means that a higher
>     similarity is required). Furthermore, a prefix can be specified
>     for FuzzyQuerys so that only those terms are considered similar that
>     start with this prefix. This can speed up FuzzyQuery greatly.
>     (Daniel Naber, Christoph Goller)
> This note is for Lucene 1.9.  But Lucene 1.4.2 has this feature in it.  
> There is no section in CHANGES.txt for 1.4.2.
> Even the change in FuzzyQuery.toString broke one of my test cases :(
>     Erik

It seems that I did not think enough about the changes in QueryParser.
They definitely break the API. Sorry for doing this a little bit too
hastily. The following changes in QueryParser break the API:

1) Analyzer argument in both getFieldQuery methods
2) Analyzer argument in getRangeQuery
3) Additional minSimilarity argument in getFuzzyQuery
4) Default minimum similarity in query parser
5) FuzzyQuery.toString which also contains minSimilarity

These things clearly could break existing applications. So the best
solution would be to undo them. I am not sure whether we should undo
4 and 5, since they make fuzzy queries a little bit more usable and
QueryParser is able to read the new FuzzyQuery.toString. But other
applications may not ....

Since 1.4.2 is already out, we would have to make a version 1.4.3.

What do others think?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message