On 7/12/06, Ning Li <[EMAIL PROTECTED]> wrote:
> I'll rephrase my original question:
> When implementing NewIndexModifier, what type of efficiencies do we
> get by using the new protected methods of IndexWriter vs using the
> public APIs of IndexReader and IndexWriter?
What do you think can be best achieved by using the public APIs of
IndexReader and IndexWriter?
I'm not sure I understand your question.... you mean why would one
want to stick to public APIs? The IndexWriter class them is a simpler
implementation that's easier to understand and verify correctness,
easier to make changes+enhancements to, easier to maintain. The new
class (NewIndexModifier) is not as tightly coupled and doesn't have to
be inspected and fixed every time a change to IndexModifier is made.
Overwriting documents (via delete then add) or interleaving adds and
deletes is a common Lucene usecase... it would be a good thing if this
functionality were somewhere in Lucene in an efficient form.
If it can be done in a separate class, using public APIs (or at least
with a minimum of protected access), without a loss in performance,
then that's the way to go IMO. If you lose too much performance, then
we start looking at the bare minimum functionality we need to expose
to recover that performance.
-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]