lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Fieldable breaks backward compatibility
Date Wed, 21 Jun 2006 18:42:27 GMT
Looking at the changes a little more, it looks like the following
Document methods should be reverted:

   public final Fieldable[] getFields(String name)
and
  public final Fieldable getField(String name)

That should preserve compatibility with older applications.
The only danger is that a cast to Field might fail if it's another
type of Fieldable.  That should only be possible if you are using the
new FieldSelector method to cause some other kind of Fieldable to be
instantiated though.

I'll open a bug for this.

-Yonik

On 6/21/06, Yonik Seeley <yseeley@gmail.com> wrote:
> LUCENE-545 that was recently committed breaks backward compatibility with
> Document.getField(),  a non-expert level API that is *very* widely used.
>
> Something simple like
>   Field x = mydoc.getField("x");
> no longer compiles (and neither do other methods with Field in the signature).
>
> Is this intentional?
> If not, uses of "Field" in unit tests should not have been changed to Fieldable.
>
> -Yonik
> http://incubator.apache.org/solr Solr, the open-source Lucene search server
>


-- 
-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

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


Mime
View raw message