lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4319) Rethink Fields.size() returning -1
Date Tue, 21 Aug 2012 15:02:38 GMT


Robert Muir commented on LUCENE-4319:

I guess my concern here is vectors, someone could have one that cannot implement this efficiently.

But this could be no problem for such a vector impl:
* lots of vector access (at least in our codebase) goes to a specific field.
* maybe they have optimized bulk copy for merging, so they dont need to know this up front
for that either.

Still nothing like this exists, and it seems like usually you would write the size for convenience
> Rethink Fields.size() returning -1
> ----------------------------------
>                 Key: LUCENE-4319
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Task
>          Components: core/index
>    Affects Versions: 4.0-BETA
>            Reporter: Uwe Schindler
> Fields.size() is allowed to return -1, if size of iterator is unknown. But for all codecs,
we know this size and also Fields implements Iterable (see also discussion on LUCENE-4315).
> We should think about enfocing it to be defined.
> Some things to do:
> - Maybe automatically make Fields.size() base class iterate, if not reimplemented (risky!).
> - MultiFields.size() must implement it

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