luetzkendorf 2005/03/11 08:29:32 Modified: src/stores/org/apache/slide/index/lucene AbstractLuceneIndexer.java Log: fix: with multiple calls to updateIndex infos are lost Revision Changes Path 1.2 +5 -0 jakarta-slide/src/stores/org/apache/slide/index/lucene/AbstractLuceneIndexer.java Index: AbstractLuceneIndexer.java =================================================================== RCS file: /home/cvs/jakarta-slide/src/stores/org/apache/slide/index/lucene/AbstractLuceneIndexer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractLuceneIndexer.java 8 Nov 2004 09:45:17 -0000 1.1 +++ AbstractLuceneIndexer.java 11 Mar 2005 16:29:32 -0000 1.2 @@ -358,12 +358,15 @@ void addRemoveJob(Uri uri, NodeRevisionNumber version) { Index.IndexJob job = this.idx.createDeleteJob(uri, version); this.indexJobs.remove(job); + this.removeJobs.remove(job); // remove before add because different jobs for same uri have the same key this.removeJobs.add(job); } void addUpdateJob(Uri uri, NodeRevisionDescriptor descriptor) { Index.IndexJob job = this.idx.createIndexJob(uri, descriptor); + this.removeJobs.remove(job); // remove before add because different jobs for same uri have the same key this.removeJobs.add(job); + this.indexJobs.remove(job); this.indexJobs.add(job); } void addUpdateJob(Uri uri, @@ -371,7 +374,9 @@ InputStream content) { Index.IndexJob job = this.idx.createIndexJob(uri, descriptor, content); + this.removeJobs.remove(job); // remove before add because different jobs for same uri have the same key this.removeJobs.add(job); + this.indexJobs.remove(job); this.indexJobs.add(job); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]