lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: NewIndexModifier - - - DeletingIndexWriter
Date Thu, 08 Feb 2007 08:59:27 GMT
:
: As 2.1 is soon coming, I wonder if NewIndexModifier is a proper name for
: the public API.
: (It would be the first NewXYZ and there is no OldXYZ either...)
:
: How about renaming it to something like DeletingIndexWriter?

I haven't been following the Jira issue that closely (LUCENE-565), but as
i recall the name question comes up because the class originally intended
to replace IndexModifier, but it's API/purpose has evolved so that it is
no longer a suitable "drop in replacement" for the current IndexModifier
is that correct?

NewIndexModifier currently subclasses IndexWriter and adds the following
public methods...

  public void setMaxBufferedDeleteTerms(int maxBufferedDeleteTerms)
  public int getMaxBufferedDeleteTerms()
  public void updateDocument(Term term, Document doc)
  public void updateDocument(Term term, Document doc, Analyzer analyzer)
  public synchronized void deleteDocuments(Term term)
  public synchronized void deleteDocuments(Term[] terms)

from an API standpoint, it seems like this could easily replace the
current IndexModifier (which would have the nice side effect of resolving
the issue of wether the name NewIndexModifier is good enough) assuming the
semantics of the classes/methdos are the same -- i'm not sure if they are.

skimming hte history of LUCENE-565 it's not clear to me why this was
implemented as a new class with the name NewIndexModifier ... was that
just how it evolved organicly?


if it's not possible to make this class replace IndexModifier, then
DeletingIndexWriter or BufferedDeletingIndexWriter seem like they would be
fine to me.

-Hoss


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


Mime
View raw message