lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Williams <ch...@manawiz.com>
Subject Re: [jira] Commented: (LUCENE-565) Supporting deleteDocuments in IndexWriter (Code and Performance Results Provided)
Date Thu, 06 Jul 2006 21:07:41 GMT
robert engels wrote on 07/06/2006 12:24 PM:
> I guess we just chose a much simpler way to do this...
>
> Even with you code changes, to see the modification made using the
> IndexWriter, it must be closed, and a new IndexReader opened.
>
> So a far simpler way is to get the collection of updates first, then
>
> using opened indexreader,
> for each doc in collection
>       delete document using "key"
> endfor
>
> open indexwriter
> for each doc in collection
>       add document
> endfor
>
> open indexreader
>
>
> I don't see how your way is any faster. You must always flush to disk
> and open the indexreader to see the changes.

With the patch you can have ongoing writes and deletes happening
asynchronously with reads and searches.  Reopening the IndexReader to
refresh its view is an independent decision.  The IndexWriter need never
be closed.

Without the patch, you have to close the IndexWriter to do any deletes. 
If the requirements of your app prohibit batching updates for very long,
this could be a frequent occurrence.

So, it seems to me the patch has benefit for apps that do frequent
updates and need reasonably quick access to those changes.

Bulk updates however require yet another approach.  Sorry to change
topics here, but I'm wondering if there was a final decision on the
question of java 1.5 in the core.  If I submitted a bulk update
capability that required java 1.5, would it be eligible for inclusion in
the core or not?

Chuck


---------------------------------------------------------------------
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