[
https://issues.apache.org/jira/browse/LUCENE-4670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13548720#comment-13548720
]
Robert Muir commented on LUCENE-4670:
-------------------------------------
Terms/PostingsConsumer doesnt do it in general: e.g. startField doesn't tell
you the number of terms, and startTerms
doesnt tell you the number of documents. so they must have finish() since they
are filtering deleted docs on the fly.
For the per-document apis (Stored Fields, Term Vectors), we instead give you
this number totally up-front (as it makes it easier to e.g. write numTerms into
your file).
I'm not necessarily opposed to the redundant calls, but it should then also be
done with the stored fields api. And i'd like to see if it really simplifies
some of our existing impls (SimpleText, Lucene40) as well.
Finally, adding checks to AssertingCodec as a test is a good idea, however it
still leaves our default merge implementation untested because the wrapped
codec implements bulk merge.
> Add TermVectorsWriter.finish{Doc,Field,Term} to make development of new
> formats easier
> --------------------------------------------------------------------------------------
>
> Key: LUCENE-4670
> URL: https://issues.apache.org/jira/browse/LUCENE-4670
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Assignee: Adrien Grand
> Priority: Minor
> Fix For: 4.1
>
> Attachments: LUCENE-4670.patch
>
>
> This is especially useful to LUCENE-4599 where actions have to be taken after
> a doc/field/term has been added.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]