Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 79617 invoked from network); 12 Sep 2008 11:58:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2008 11:58:21 -0000 Received: (qmail 39422 invoked by uid 500); 12 Sep 2008 11:58:11 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 39393 invoked by uid 500); 12 Sep 2008 11:58:11 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 39382 invoked by uid 99); 12 Sep 2008 11:58:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Sep 2008 04:58:11 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of marcelo.schneider@digitro.com.br designates 189.85.128.24 as permitted sender) Received: from [189.85.128.24] (HELO mail.digitro.com.br) (189.85.128.24) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Sep 2008 11:57:12 +0000 Received: from serverdgt.daf.digitro.com.br (firewall [189.85.128.10]) by mail.digitro.com.br (Postfix) with ESMTP id 17CFD1F90B51 for ; Fri, 12 Sep 2008 08:51:10 -0300 (BRT) Received: from [192.168.170.157] (dinamico157.dti.digitro.com.br [192.168.170.157]) by serverdgt.daf.digitro.com.br (Postfix) with ESMTP id 12A193C4707 for ; Fri, 12 Sep 2008 08:56:02 -0300 (BRT) Message-ID: <48CA58D6.1070700@digitro.com.br> Date: Fri, 12 Sep 2008 08:56:06 -0300 From: Marcelo Schneider User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: Spawn an indexing thread on every update References: <19444244.post@talk.nabble.com> <8c4e68610809120229s7db02303w47504d90f60a7340@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Digitro-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 17CFD1F90B51.3CC18 X-Digitro-MailScanner: Found to be clean X-Digitro-MailScanner-From: marcelo.schneider@digitro.com.br X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No Our application does exactly that: a background thread (Thread.MIN_PRIORITY) that buffers every "waiting" document and indexes every ~3 minutes, then reopens the searcher. No problems so far... * -- *Marcelo Frantz Schneider SIC - TCO - Tecnologia em Engenharia do Conhecimento DÍGITRO TECNOLOGIA* * Simon Willnauer escreveu: > I guess similar problems have been discussed on the list over and over again. > Why don't you use a single update thread which takes care of batch > processing, commit threshold or performs commits after a certain time > span. > This would at least prevent you from spawning all the threads which > is, as far as I can tell not necessary. > Your update thread could also notify you searcher to reopen the index > as soon as a change or a batch was commited. > If you are looking for examples you might find some good examples in > the Solr code. > > - simon > > On Fri, Sep 12, 2008 at 11:29 AM, Ian Lea wrote: > >> Hi >> >> >> Why 15 mins? Can you try lower values to get a balance between load >> and freshness? >> >> >> >> -- >> Ian. >> >> >> On Thu, Sep 11, 2008 at 9:43 PM, nobody wrote: >> >>> Hi, >>> >>> In our application, I want users to be able to search for the updates they >>> make almost immediately. Hence, whenever they update, I spawn a thread >>> immediately to index. However, when the load on the application is very high >>> the number of threads spawned increases, and this results in "cannot create >>> native thread" error. >>> >>> We are thinking of running the indexing thread once in every 15 mins, >>> through a scheduler, and buffer all the writes till the thread runs. >>> However, this will result in stale results on the search. Please advice what >>> is the best approach in this regard. >>> >>> -thanks >>> -- >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >> For additional commands, e-mail: java-user-help@lucene.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- Esta mensagem foi verificada pelo sistema de antiv�rus da D�gitro e acredita-se estar livre de perigo. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org