lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niall Gallagher <>
Subject Re: IndexWriter Problem
Date Tue, 23 Dec 2003 14:11:44 GMT

 >> think I have resolved the problem. I was using Lucene to index 
several directories concurrently within
 >> the same JVM, and as far as I can tell Lucene cannot do coucurrent 
indexing. Is this correct ?

 > You can do it concurrently, but you must use the *same* IndexWriter 
instance on all threads.  

I was using different 'index' directories for each, it seems that there 
is some static resource that is not thread safe in some manner. For 
example my implementation went somthing like

for(int i = 0; i < 10; i++){
    new Thread(this).start();

public void run(){
       String path = queue.dequeue();
       index(path,  new File(path, "index"));

Should this work ? Because when I used it there was only ever one 
indexing task ever updating the index, that is, the last IndexWriter 
created was the only one updating its index directory.


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

View raw message