lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chuck Williams (JIRA)" <>
Subject [jira] Commented: (LUCENE-609) Lazy field loading breaks backward compat
Date Wed, 21 Jun 2006 21:13:30 GMT
    [ ] 

Chuck Williams commented on LUCENE-609:

I'm late to the discussion and have only read the patch file, but it seems invalid to me.
 Won't getField() get a class cast exception when it encounters a Fieldable that is not a
Field?  The semantics of getField() would have to be something like, "only get this field
if it is a Field rather than some other kind of Fieldable", which means it would have to do
type testing on the members of fields.

I think it is much better to remove this patch and leave Fieldable as is.  Searchable was
the same kind of thing.  IndexReader is an abstract super class for the different types of
readers.  When I did ParallelWriter, I had the same problem and had to introduce Writable
since IndexWriter is not an abstract class and ParallelWriter is a different implementation.
 I think it is best to introduce all the abstract classes now for fundamental types that have
multiple implementations.


> Lazy field loading breaks backward compat
> -----------------------------------------
>          Key: LUCENE-609
>          URL:
>      Project: Lucene - Java
>         Type: Bug

>   Components: Other
>     Versions: 2.0.1
>     Reporter: Yonik Seeley
>     Assignee: Yonik Seeley
>      Fix For: 2.0.1
>  Attachments: fieldable_patch.diff
> Document.getField() and Document.getFields() have changed in a non backward compatible
> Simple code like the following no longer compiles:
>  Field x = mydoc.getField("x");

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message