cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21557] - [PATCH] to LuceneIndexTransformer
Date Fri, 18 Jul 2003 07:56:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21557>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21557

[PATCH] to LuceneIndexTransformer





------- Additional Comments From conalt@paradise.net.nz  2003-07-18 07:56 -------
I've done some more work on the transformer:

The second diff is based on the same original version as the first (so no need 
to apply the first diff).

This version allows "incremental" indexing; fixing a bug in the original which 
would add multiple versions of the same document (with the same UID) to the 
index, if the document was indexed more than once. This new version of the 
transformer first deletes any old version of a document (using IndexReader) 
before adding a new version (using IndexWriter). 

Unfortunately, IndexReader and IndexWriter can't both operate on the same index 
at the same time, so they have to be opened and closed for each document, which 
impacts performance a bit. However, this only applies if the "create" flag is 
false. If "create" is true then the index is dropped and recreated, so there's 
no need to handle stale versions of documents, and a single instance 
IndexWriter is used to index all documents, as in the original version of 
LuceneIndexTransformer.

Also, I've changed the semantics of the "create" flag slightly, in that an 
index is always created if it is missing, even if the "create" flag is false. 
This means that to index incrementally, you can use create="false", and it will 
work even on the first time, when there's no existing index. Using 
create="true" is only useful as an optimisation when rebuilding the entire 
index.

Mime
View raw message