Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 70271 invoked from network); 23 Dec 2003 14:11:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 23 Dec 2003 14:11:45 -0000 Received: (qmail 69195 invoked by uid 500); 23 Dec 2003 14:11:36 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 69164 invoked by uid 500); 23 Dec 2003 14:11:36 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 69150 invoked from network); 23 Dec 2003 14:11:36 -0000 Received: from unknown (HELO nwd2mail1.analog.com) (137.71.25.50) by daedalus.apache.org with SMTP; 23 Dec 2003 14:11:36 -0000 Received: from nwd2mhb1.analog.com (nwd2mhb1.analog.com [137.71.5.12]) by nwd2mail1.analog.com (8.12.10/8.12.10) with ESMTP id hBNEBaeZ012330 for ; Tue, 23 Dec 2003 09:11:36 -0500 Received: from dsun1.adbvdesign.analog.com ([10.32.54.16]) by nwd2mhb1.analog.com (8.9.3 (PHNE_28810+JAGae91741)/8.9.3) with ESMTP id JAA02483 for ; Tue, 23 Dec 2003 09:11:35 -0500 (EST) Received: from dsun487.adbvdesign.analog.com (dsun487 [10.32.54.30]) by dsun1.adbvdesign.analog.com (8.11.6+Sun/8.11.6) with ESMTP id hBNEBYL01265 for ; Tue, 23 Dec 2003 14:11:34 GMT Received: from analog.com (localhost [127.0.0.1]) by dsun487.adbvdesign.analog.com (8.10.2+Sun/8.10.2) with ESMTP id hBNEBke27839 for ; Tue, 23 Dec 2003 14:11:46 GMT Message-ID: <3FE84D20.60509@analog.com> Date: Tue, 23 Dec 2003 14:11:44 +0000 From: Niall Gallagher Reply-To: niall.gallagher@analog.com User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20031016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Lucene Users List Subject: Re: IndexWriter Problem References: <3FE81CD7.2020701@analog.com> <3FE83FD6.4050809@analog.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=10.0 tests=none version=2.60 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) X-Scanned-By: MIMEDefang 2.38 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >> 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: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org