>> 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(){
while(true){
String path = queue.dequeue();
if(isActive(path)){
contuine;
}
activate(path);
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.

Niall



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to