lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] Commented: (LUCENE-2310) Reduce Fieldable, AbstractField and Field complexity
Date Sun, 14 Mar 2010 20:41:27 GMT


Shai Erera commented on LUCENE-2310:

I can't think of why one would want to know how many fields a Document has. But even then,
we can add a numFields() method to Document. The Iterable thingy will just prevent a lot of
unnecessayy work I think.

About remove(String fieldName), I don't see a case for that as well. A Document is a point
in time object - you parse a document, extract metadata, converts the entire flow to a Lucene
object (in this case Document) and passes it along to IW. You then move on to the next document.

So I wouldn't know why would someone want to remove a field from a Document ... but perhaps
I just haven't run into the use case yet. Iterable btw will at least alert the user if he
did that, because a ConcurrentModificationException will be thrown (if we're using a List-based
iterator) ...

> Reduce Fieldable, AbstractField and Field complexity
> ----------------------------------------------------
>                 Key: LUCENE-2310
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Sub-task
>          Components: Index
>            Reporter: Chris Male
>         Attachments: LUCENE-2310-Deprecate-AbstractField.patch, LUCENE-2310-Deprecate-AbstractField.patch,
> In order to move field type like functionality into its own class, we really need to
try to tackle the hierarchy of Fieldable, AbstractField and Field.  Currently AbstractField
depends on Field, and does not provide much more functionality that storing fields, most of
which are being moved over to FieldType.  Therefore it seems ideal to try to deprecate AbstractField
(and possible Fieldable), moving much of the functionality into Field and FieldType.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message