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
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 (the generics also enforce that the rewrit

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Uwe Schindler
> 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 (the > generics also enforce that the rewrite needs to rewrite() to a class

RE: Uable to extends TopTermsRewrite in Lucene 4.1

2013-02-26 Thread Uwe Schindler
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 (the generics also enforce that the rewrite needs to rewrite() to a class that’s sp