Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 79202 invoked from network); 24 Sep 2010 07:02:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Sep 2010 07:02:02 -0000 Received: (qmail 81041 invoked by uid 500); 24 Sep 2010 07:02:00 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 80649 invoked by uid 500); 24 Sep 2010 07:01:56 -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 80640 invoked by uid 99); 24 Sep 2010 07:01:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 07:01:55 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of torindan@gmail.com designates 209.85.216.48 as permitted sender) Received: from [209.85.216.48] (HELO mail-qw0-f48.google.com) (209.85.216.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Sep 2010 07:01:50 +0000 Received: by qwk3 with SMTP id 3so2124009qwk.35 for ; Fri, 24 Sep 2010 00:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=tihxty/XNYH5tBoT8Q5kcDIWrJjnxKa7Ggjf7oZsbWw=; b=tpoG7yJFK3htPZqkMmKrCA2s1OXlfN50TIup/wbMfvOM2+xBeNtmF1RppLM1GnvUV8 WAdjvCwtWDlhRBeAWEY1WcMU5FwuknuDhyyvYpYo49uLa4mIj8Eyyy6GIGGbJVDKi4Ec dksnRG7hgfr0GLFR0WWXKEV0nrj/gZnU0PjsM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=QEXblrh70tCV4s3wdbTT/znCs9oBF59sQAKgxMqVPpNG8eGwJxaw70KID4aCeYmAT3 tFfoUYcvdOmNQ4ULaNYiFtH7rqRl2rxPmGavGc9+LFpS2ET9eBHxQ8MGW3YyYsAyeIir /mMaoVYN/7uB/N14eDOeyHlpUt/QhYNMK5sr4= Received: by 10.229.52.38 with SMTP id f38mr2165613qcg.224.1285311688519; Fri, 24 Sep 2010 00:01:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.14.170 with HTTP; Fri, 24 Sep 2010 00:01:08 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?B?RGFuaWwgxaJPUklO?= Date: Fri, 24 Sep 2010 10:01:08 +0300 Message-ID: Subject: Re: In lucene 2.3.2, needs to stop optimization? To: java-user@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Is it possible for you to migrate to 2.9.x ? Or even 3.x ? There are some huge optimization in 2.9 on reopening indexes that significantly improve search speed. I'm not sure..but I think indexWriter.getReader() for almost realtime was added to 2.9, so you can keep your writer always open and get very cheaply a new reader on each search request. On Fri, Sep 24, 2010 at 09:47, Zhang, Lisheng wrote: > Hi, > > I read document/code and did some experiments, one possibility > is to raise mergeFactor to high value, say close to 2Billion, > then a lot of small files are created and after >500 docs are > created separately, search speed dropped sharply. > > I noticed with our current data, if I add one doc then call > optimize(), it took about 7s, this is too slow for real time > search. > > If I keep mergeFactor as 10 and donot call optimize(), does it > mean from time to time IndexWriter would optimize on background, > when it happens, it may take a few seconds (so Index will delay > a few seconds)? > > Should I use high mergeFactor and optimize once a day, or use > default mergeFactor and donot call optimize? maybe latter is > better, but I am concerned about occasional slowness? > > Currently I donot plan to keep IndexWriter constantly open, but > open/close for each index request. > > Any suggestion to improve would be appreciated, > > Lisheng > > -----Original Message----- > From: Zhang, Lisheng [mailto:Lisheng.Zhang@BroadVision.com] > Sent: Thursday, September 23, 2010 6:11 PM > To: java-user@lucene.apache.org > Subject: In lucene 2.3.2, needs to stop optimization? > > > Hi, > > We are using lucene 2.3.2, now we need to index each document as > fast as possible, so user can almost immediately search it. > > So I am considering stop IndexWriter optimization during real time, > then in relatively off-time like late night we may call IndexWriter optimize > method explicitly once. > > What is the most efficient way to completely turn off IndexWriter merge > in lucene 2.3.2? > > Thanks very much for helps, Lisheng > > --------------------------------------------------------------------- > 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org