lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "OJ" <>
Subject IndexWriter.docCount() reporting 0
Date Tue, 18 May 2004 11:18:56 GMT

I'm having some trouble with an index of mine. Basically, I'm having a
content managment system with a timertask that regularily triggers an
indexing method. This method indexes content that has been added to the
CMS since last excecution of the indexing method. This all works fine...
Or so it seems. During this weekend I ran an automated test where I
change, add and delete objects in the CMS to see if they are indexed
alright. After some 13 hours of reporting numbers between 120-160
documents, my IndexWriter suddenly reported 0 (and kept on doing it for 2
days). There was no Exception prior to this - it just happened. A simple
restart made the index work again, so I guess the actual index folder
content is allright.

Basically, all I do is :

on timed intervals {
   create org.apache.lucene.index.IndexReader indexReader from basedir;
   while( there are changed/deleted documents ) {
      indexReader.delete( some term );
   create org.apache.lucene.index.IndexWriter indexWriter from basedir;
   while( there are added/changed documents ){
      create org.apache.lucene.document.Document and add fields;
   system.out.println( "I am indexing " + indexWriter.docCount() );

Has anyone experienced similar problems? Anyone found a way to "kick" the
IndexWriter back into action without restarting?
I'm running Resin 2.1.10 on windows XP, java version 1.4.2_03 and Lucene
version 1.3 final.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message