You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Antony Bowesman <ad...@teamware.com> on 2009/12/08 07:44:25 UTC

TopFieldDocCollector and v3.0.0

I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0

In 2.9.1 TopFieldDocCollector is

"Deprecated. Please use TopFieldCollector instead."

in 3.0.0 TopFieldCollector says

NOTE: This API is experimental and might change in incompatible ways in the next 
release

What is the suggested path for migrating TopFieldDocCollector usage?

Antony



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


RE: TopFieldDocCollector and v3.0.0

Posted by Uwe Schindler <uw...@thetaphi.de>.
That's a java docs issue and already fixed for the 3.0 branch. You have to
use the no longer experimental API.

Any by the way: Experimental means not "bad" or "functionally unstable", it
just means that the API might change on later releases.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Antony Bowesman [mailto:adb@teamware.com]
> Sent: Tuesday, December 08, 2009 7:44 AM
> To: Lucene User
> Subject: TopFieldDocCollector and v3.0.0
> 
> I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
> 
> In 2.9.1 TopFieldDocCollector is
> 
> "Deprecated. Please use TopFieldCollector instead."
> 
> in 3.0.0 TopFieldCollector says
> 
> NOTE: This API is experimental and might change in incompatible ways in
> the next
> release
> 
> What is the suggested path for migrating TopFieldDocCollector usage?
> 
> Antony
> 
> 
> 
> ---------------------------------------------------------------------
> 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


RE: TopFieldDocCollector and v3.0.0

Posted by Uwe Schindler <uw...@thetaphi.de>.
Sorry wrong word, Germans often have the problem with English "must". It has
to be to be "but you must not".

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Steven A Rowe [mailto:sarowe@syr.edu]
> Sent: Tuesday, December 08, 2009 8:42 PM
> To: java-user@lucene.apache.org
> Subject: RE: TopFieldDocCollector and v3.0.0
> 
> Hi Uwe,
> 
> On 12/08/2009 at 9:40 AM, Uwe Schindler wrote:
> > After the move to 3.0, you can (but you must not) further update
> > your code to use generics, which is not really needed but will
> > remove all compiler warnings.
> 
> This sounds like you're telling people that although they are able to
> update their code to use generics, it is forbidden.
> 
> I'm sure, though, that you mean that they are not required to do so:
> something like "but you need not" rather than "but you must not".
> 
> Steve
> 
> ---------------------------------------------------------------------
> 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


RE: TopFieldDocCollector and v3.0.0

Posted by Steven A Rowe <sa...@syr.edu>.
Hi Uwe,

On 12/08/2009 at 9:40 AM, Uwe Schindler wrote:
> After the move to 3.0, you can (but you must not) further update
> your code to use generics, which is not really needed but will
> remove all compiler warnings.

This sounds like you're telling people that although they are able to update their code to use generics, it is forbidden.

I'm sure, though, that you mean that they are not required to do so: something like "but you need not" rather than "but you must not".

Steve

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


RE: TopFieldDocCollector and v3.0.0

Posted by Uwe Schindler <uw...@thetaphi.de>.
The only difference to 3.0 is, that after moving to 3.0, you can remove lots
of unsafe casts and use generics (which does not work in 2.9, as it is Java
1.4 only). So this is the good thing when directly moving to 3.0.

But as the release notes for 3.0 denote, for new users that want to start
new projects, 3.0 is the best start because they get a clean generified and
type safe API (whichout old crap). For users porting from older versions,
the move through 2.9.1 is recommended. After the move to 3.0, you can (but
you must not) further update your code to use generics, which is not really
needed but will remove all compiler warnings.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Erick Erickson [mailto:erickerickson@gmail.com]
> Sent: Tuesday, December 08, 2009 2:24 PM
> To: java-user@lucene.apache.org
> Subject: Re: TopFieldDocCollector and v3.0.0
> 
> You might want to move to 2.9.1 first, find and fix all the deprecations
> and *then* move to 3.x.
> 
> It seems like more work, but it's actually not. Especially if you have
> reasonable
> unit tests. Since lots of effort has been put into maintaining backwards
> compatibility in the 2.X versions, 2.9.1 should "just work" for you. Then
> you can remove the deprecated methods a little bit at a time rather than
> all at once. It's always tempting to do things in "one big edit", but then
> you
> never know which one of the many changes actually broke something. Unless
> you can code perfectly the first time, in which case I'd recommend we hire
> you and pay you a gazillion dollars <G>....
> 
> Once all the deprecations are removed from 2.9.1, you shouldn't have to do
> anything to move to 3.x. So you get the best of both worlds....
> 
> Best
> Erick
> 
> 
> On Tue, Dec 8, 2009 at 1:44 AM, Antony Bowesman <ad...@teamware.com> wrote:
> 
> > I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
> >
> > In 2.9.1 TopFieldDocCollector is
> >
> > "Deprecated. Please use TopFieldCollector instead."
> >
> > in 3.0.0 TopFieldCollector says
> >
> > NOTE: This API is experimental and might change in incompatible ways in
> the
> > next release
> >
> > What is the suggested path for migrating TopFieldDocCollector usage?
> >
> > Antony
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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


Re: TopFieldDocCollector and v3.0.0

Posted by Erick Erickson <er...@gmail.com>.
You might want to move to 2.9.1 first, find and fix all the deprecations
and *then* move to 3.x.

It seems like more work, but it's actually not. Especially if you have
reasonable
unit tests. Since lots of effort has been put into maintaining backwards
compatibility in the 2.X versions, 2.9.1 should "just work" for you. Then
you can remove the deprecated methods a little bit at a time rather than
all at once. It's always tempting to do things in "one big edit", but then
you
never know which one of the many changes actually broke something. Unless
you can code perfectly the first time, in which case I'd recommend we hire
you and pay you a gazillion dollars <G>....

Once all the deprecations are removed from 2.9.1, you shouldn't have to do
anything to move to 3.x. So you get the best of both worlds....

Best
Erick


On Tue, Dec 8, 2009 at 1:44 AM, Antony Bowesman <ad...@teamware.com> wrote:

> I'm on 2.3.2 and looking to move to 2.9.1 or 3.0.0
>
> In 2.9.1 TopFieldDocCollector is
>
> "Deprecated. Please use TopFieldCollector instead."
>
> in 3.0.0 TopFieldCollector says
>
> NOTE: This API is experimental and might change in incompatible ways in the
> next release
>
> What is the suggested path for migrating TopFieldDocCollector usage?
>
> Antony
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>