I'm thinking about the impact of adding "deleteDocument(int doc)" on
LUCENE-847, especially on concurrent merge. The semantics of
"deleteDocument(int doc)" is that the document to delete is specified
by the document id on the index at the time of the call. When a merge
is finished and the result is being checked into IndexWriter's
SegmentInfos, document ids may change. Therefore, it may be necessary
to flush buffered delete doc ids (thus buffered docs and delete terms
as well) before a merge result is checked in.

The flush is not necessary if there is no buffered delete doc ids. I
don't think it should be the reason not to support "deleteDocument(int
doc)" in IndexWriter. But its impact on concurrent merge is a concern.

Ning


On 8/7/07, Grant Ingersoll <[EMAIL PROTECTED]> wrote:
> +1
>
>
> On Aug 7, 2007, at 3:37 PM, Ning Li wrote:
>
> > With the plan towards 3.0 release laid out, I think it's a good time
> > to deprecate IndexModifier and eventually remove IndexModifier.
> >
> > The only method in IndexModifier which is not implemented in
> > IndexWriter is "deleteDocument(int doc)". This is because of the
> > concern that document ids are changing as documents are deleted and
> > segments are merged. Should we add "deleteDocument(int doc)" to
> > IndexWriter but comment that it is an expert method, and then
> > deprecate IndexModifier and eventually remove IndexModifier?
> >
> > Cheers,
> > Ning
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to