Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 9390 invoked from network); 4 Jun 2006 09:59:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jun 2006 09:59:05 -0000 Received: (qmail 47886 invoked by uid 500); 4 Jun 2006 09:59:03 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 47851 invoked by uid 500); 4 Jun 2006 09:59:03 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 47840 invoked by uid 99); 4 Jun 2006 09:59:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 02:59:03 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of simon.willnauer@googlemail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Jun 2006 02:59:00 -0700 Received: by ug-out-1314.google.com with SMTP id u2so991587uge for ; Sun, 04 Jun 2006 02:58:38 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=GJNDU0dSonnrGtg87gpi0B9jVylYR5Jv7zTbkrAjtgR5HS126k4G1+zIav0LcWvxhArRRAzjMUZCF4zJdPIpN+dD+nByOCtrZjZwWGZTJuark4PpdACyWKsqMhETRskx/Ny56fiqLsjm4UOy5XWSQog0JIaPWjg2kq4DuGmv8hM= Received: by 10.67.96.14 with SMTP id y14mr2336526ugl; Sun, 04 Jun 2006 02:58:38 -0700 (PDT) Received: by 10.66.236.1 with HTTP; Sun, 4 Jun 2006 02:58:38 -0700 (PDT) Message-ID: Date: Sun, 4 Jun 2006 11:58:38 +0200 From: "Simon Willnauer" Reply-To: simon.willnauer@gmail.com To: java-dev@lucene.apache.org, rengels@ix.netcom.com Subject: Re: IndexWriter multithreaded? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_39685_30277726.1149415118217" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_39685_30277726.1149415118217 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 6/4/06, Robert Engels wrote: > > I understand that there can only be a single active IndexWriter per > Directory, but is the IndexWriter multithreaded (it seems to be)? Do you mean the a IndexWriter works with several threads or is thread-safe? maybe this one helps: http://www.mail-archive.com/lucene-dev@jakarta.apache.org/msg00157.html It would appear that on a multiprocessor box using multiple threads to add > documents from a queue would be much faster (due to the parallel > tokenization)? This is true, you should keep the actual index writer always busy to get the best performance out of the single index writer. There are several approaches around to do that, for ex. you could index your documents mutlithreaded into a RamDir per thread and merge them together after a certain amount of documents. Do I have this correct? > > Thanks. > Robert > > ------=_Part_39685_30277726.1149415118217--