lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3554) AbstractField / Field / NumericField do not override equals and hashcode methods
Date Thu, 03 Nov 2011 17:53:32 GMT


Hoss Man commented on LUCENE-3554:

bq. The problem is you would have to consume the entire stream (analyze the potentially large
document) to compute this

...but TokenStream (via AttributeSource) already has equals+hashCode methods that aren't just
inherited from Object -- are they doing this stream consumption?

if they are, that seems like a bug (TokenStream should probably override AttributeSource to
use "==" and System.identiyHashCode, right?)

That seems like an orthogonal issue to whether AbstractField/Field/NumericField could have
useful equals/hashCode methods -- it seems like those classes should be able to compose the
equals/hashCodes of their parts, and if in some cases one of those parts is a TokenStream
(which uses Object.equals) so be it -- but in other cases (ie: NumericField, or other user
implemented subclasses of AbstractField) it might be very useful.

> AbstractField / Field / NumericField do not override equals and hashcode methods
> --------------------------------------------------------------------------------
>                 Key: LUCENE-3554
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Wish
>          Components: core/index
>            Reporter: Alexandre Dupriez
>            Priority: Minor
>   Original Estimate: 1h 55m
>  Remaining Estimate: 1h 55m
> Field, NumericField and AbstractField implementations of Fieldable do not override equals
and hashcode methods and cannot be compared as such.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


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

View raw message