RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-04-04 Thread Uwe Schindler
Hi, this looks also fine. If the generics in the FuzzyRewrite from the last mail are correct, the cast in this rewrite is not needed, too (and DisjunctionMaxQuery implements Iterable, so you can use a simple for-loop): @Override public Query rewrite(final IndexReader reader

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-04-04 Thread Uwe Schindler
> Okay, think I have it now. Now have a working rewrite method for Fuzzy > Queries > > public static class FuzzyTermRewrite > extends TopTermsRewrite { > > public FuzzyTermRewrite(int size) { > super(size); > } > > @Override > protected int g

Re: Uable to extends TopTermsRewrite in Lucene 4.1

2013-04-04 Thread Paul Taylor
On 04/04/2013 10:59, Paul Taylor wrote: On 27/02/2013 10:28, Uwe Schindler wrote: Hi Paul, QueryParser and MTQ's rewrite method have nothing to do with each other. The rewrite method is (explained as simple as possible) a class that is responsible to "rewrite" a MultiTermQuery to another que

Re: Uable to extends TopTermsRewrite in Lucene 4.1

2013-04-04 Thread Paul Taylor
On 27/02/2013 10:28, Uwe Schindler wrote: Hi Paul, QueryParser and MTQ's rewrite method have nothing to do with each other. The rewrite method is (explained as simple as possible) a class that is responsible to "rewrite" a MultiTermQuery to another query type (generally a query that allows to

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-27 Thread Uwe Schindler
dler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Paul Taylor [mailto:paul_t...@fastmail.fm] > Sent: Wednesday, February 27, 2013 10:53 AM > To: java-user@lucene.apache.org > Cc: Uwe Schindler > Subject: Re: Uable t

Re: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-27 Thread Paul Taylor
On 26/02/2013 18:01, Paul Taylor wrote: On 26/02/2013 17:22, Uwe Schindler wrote: Hi, You cannot override rewrite() because you could easily break the logic behind TopTermsRewrite. If you want another behavior, subclass another base class and wrap the TopTermsRewrite instead of subclassing it (

Re: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Paul Taylor
l try out your recommendations Paul -Original Message- From: Paul Taylor [mailto:paul_t...@fastmail.fm] Sent: Tuesday, February 26, 2013 5:34 PM To: java-user@lucene.apache.org Subject: Uable to extends TopTermsRewrite in Lucene 4.1 In Lucene 3.6 I had code that replicated a Dismax Qu

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Uwe Schindler
astmail.fm] > > Sent: Tuesday, February 26, 2013 5:34 PM > > To: java-user@lucene.apache.org > > Subject: Uable to extends TopTermsRewrite in Lucene 4.1 > > > > In Lucene 3.6 I had code that replicated a Dismax Query, and the > > search used fuzzy quer

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Uwe Schindler
ndler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Original Message- > From: Paul Taylor [mailto:paul_t...@fastmail.fm] > Sent: Tuesday, February 26, 2013 5:34 PM > To: java-user@lucene.apache.org > Subject: Uable to extends TopTermsRewr

Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Paul Taylor
In Lucene 3.6 I had code that replicated a Dismax Query, and the search used fuzzy queries in some cases to match values. But I was finding the score attributed to matches on fuzzy searches was completely different to the score attributed to matches on exact searches so the total score returned