I have a Windows.net service that generates Lucene search indexes every night. First, I get all the records from the database and add them to the Lucene index using the IndexWriter AddDocument method, and then I call the Optimize method before returning from the method. Since the extracted records are insufficient, indexing takes about 2-3 minutes. As you already know, Lucene generates intermediate segment files while it generates an index, and compresses the entire index into 3 files when Optimize is called.
Anyway, can I know that this index generation process has been completed by Lucene and the index is searchable? I need to know this because I want to call another method when the process is complete.
source
share