You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Shai Erera <se...@gmail.com> on 2012/02/15 07:59:42 UTC

Deprecated methods on trunk

Hi

Why do we have deprecated methods on trunk (e.g. IndexReader.open())?
Shouldn't they be deleted?

Shai

Re: Deprecated methods on trunk

Posted by Robert Muir <rc...@gmail.com>.
On Wed, Feb 15, 2012 at 6:36 AM, Shai Erera <se...@gmail.com> wrote:
> It makes sense to me, but it also means that 4.0 will go out with deprecated
> API that will exist until 5.0 is out.
>
> I only raised it to learn if this was done by mistake, or there is some
> logic behind it. I guess that for me, reading MIGRATE will be enough, but I
> cannot speak for others.

just my opinion here: I think MIGRATE.txt, Backwards Breaks section of
CHANGES.txt, etc should all be the very last resort, even on trunk.

Sure we can break APIs totally for trunk, but that doesn't mean we
should just because we can.

-- 
lucidimagination.com

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


Re: Deprecated methods on trunk

Posted by Shai Erera <se...@gmail.com>.
It makes sense to me, but it also means that 4.0 will go out with
deprecated API that will exist until 5.0 is out.

I only raised it to learn if this was done by mistake, or there is some
logic behind it. I guess that for me, reading MIGRATE will be enough, but I
cannot speak for others.

I don't mind if they are left.

Shai

On Wed, Feb 15, 2012 at 1:33 PM, Robert Muir <rc...@gmail.com> wrote:

> Hi Shai,
>
> I think in some cases its good for us to add deprecated APIs to trunk
> rather than completely breaking users.
>
> We can look at these as 'migration paths' for the user...
>
> Here is a good example of one i specifically requested (Mike
> implemented, thanks!):
> https://issues.apache.org/jira/browse/LUCENE-3682
>
> In 4.0 we totally changed the Document/Field API (FieldType etc), but
> rather than forcing ALL users to change ALL their code and learn the
> new API, i think its very helpful if, at least for a while, we support
> something that looks like the "old" api with Field.STORE, etc, etc.
>
> For a huge amount of apps, this might help them
> experiment/test/migrate to Lucene 4.0 without being frustrated.
>
> In general I think if we can add transition mechanisms like this to
> make it easier for people to cut over, we should.... are there reasons
> we should not do this?
>
> On Wed, Feb 15, 2012 at 1:59 AM, Shai Erera <se...@gmail.com> wrote:
> > Hi
> >
> > Why do we have deprecated methods on trunk (e.g. IndexReader.open())?
> > Shouldn't they be deleted?
> >
> > Shai
>
>
>
> --
> lucidimagination.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>

Re: Deprecated methods on trunk

Posted by Robert Muir <rc...@gmail.com>.
Hi Shai,

I think in some cases its good for us to add deprecated APIs to trunk
rather than completely breaking users.

We can look at these as 'migration paths' for the user...

Here is a good example of one i specifically requested (Mike
implemented, thanks!):
https://issues.apache.org/jira/browse/LUCENE-3682

In 4.0 we totally changed the Document/Field API (FieldType etc), but
rather than forcing ALL users to change ALL their code and learn the
new API, i think its very helpful if, at least for a while, we support
something that looks like the "old" api with Field.STORE, etc, etc.

For a huge amount of apps, this might help them
experiment/test/migrate to Lucene 4.0 without being frustrated.

In general I think if we can add transition mechanisms like this to
make it easier for people to cut over, we should.... are there reasons
we should not do this?

On Wed, Feb 15, 2012 at 1:59 AM, Shai Erera <se...@gmail.com> wrote:
> Hi
>
> Why do we have deprecated methods on trunk (e.g. IndexReader.open())?
> Shouldn't they be deleted?
>
> Shai



-- 
lucidimagination.com

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


Re: Deprecated methods on trunk

Posted by Shai Erera <se...@gmail.com>.
Thanks Uwe.

Can't it be removed from trunk and mentioned in MIGRATE.txt? Does this mean
that 4.0 will be released with those deprecated methods?

Shai

On Wed, Feb 15, 2012 at 11:02 AM, Uwe Schindler <uw...@thetaphi.de> wrote:

> Hi,****
>
> ** **
>
> We decided to leave this method in IR also in 4.0, as this is one of the
> most often used methods (almost every example code contains it) and users
> may get confused when it is not there.****
>
> ** **
>
> There are more examples of deprecated methods in 4.0, it’s done on a
> case-by-case basis. Especially, when there is no migration path
> (DirectoryReader is not “visible” in 3.x, so we cannot deprecate
> IndexReader.open() in 3.x).****
>
> ** **
>
> Uwe****
>
> ** **
>
> -----****
>
> Uwe Schindler****
>
> H.-H.-Meier-Allee 63, D-28213 Bremen****
>
> http://www.thetaphi.de****
>
> eMail: uwe@thetaphi.de****
>
> ** **
>
> *From:* Shai Erera [mailto:serera@gmail.com]
> *Sent:* Wednesday, February 15, 2012 8:00 AM
> *To:* dev@lucene.apache.org
> *Subject:* Deprecated methods on trunk****
>
> ** **
>
> Hi
>
> Why do we have deprecated methods on trunk (e.g. IndexReader.open())?
> Shouldn't they be deleted?
>
> Shai****
>

RE: Deprecated methods on trunk

Posted by Uwe Schindler <uw...@thetaphi.de>.
Hi,

 

We decided to leave this method in IR also in 4.0, as this is one of the
most often used methods (almost every example code contains it) and users
may get confused when it is not there.

 

There are more examples of deprecated methods in 4.0, it's done on a
case-by-case basis. Especially, when there is no migration path
(DirectoryReader is not "visible" in 3.x, so we cannot deprecate
IndexReader.open() in 3.x).

 

Uwe

 

-----

Uwe Schindler

H.-H.-Meier-Allee 63, D-28213 Bremen

http://www.thetaphi.de <http://www.thetaphi.de/> 

eMail: uwe@thetaphi.de

 

From: Shai Erera [mailto:serera@gmail.com] 
Sent: Wednesday, February 15, 2012 8:00 AM
To: dev@lucene.apache.org
Subject: Deprecated methods on trunk

 

Hi

Why do we have deprecated methods on trunk (e.g. IndexReader.open())?
Shouldn't they be deleted?

Shai