lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-4319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438781#comment-13438781
] 

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
anyway...
                
> Rethink Fields.size() returning -1
> ----------------------------------
>
>                 Key: LUCENE-4319
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4319
>             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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message