Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 97397 invoked from network); 10 Jan 2011 17:57:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 10 Jan 2011 17:57:09 -0000 Received: (qmail 52155 invoked by uid 500); 10 Jan 2011 17:57:07 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 52106 invoked by uid 500); 10 Jan 2011 17:57:07 -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 52098 invoked by uid 99); 10 Jan 2011 17:57:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jan 2011 17:57:07 +0000 X-ASF-Spam-Status: No, hits=4.4 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.142.200.115] (HELO web30502.mail.mud.yahoo.com) (68.142.200.115) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 10 Jan 2011 17:56:58 +0000 Received: (qmail 19326 invoked by uid 60001); 10 Jan 2011 17:56:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1294682196; bh=XmPLI7K3ZxThIUUFR2U3ox2pHrmhcUHr1EHxZKyXMZI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=aaXn4qgQYOBvsEvtNb0PQQC9PE7scGJ5eeS6xvhxMXozqSqCDwaVJk4sUQsr/YPj3uHb7pOXlSQhM48L+HRz4EhTQFhUeGT+2G4sLkvU+cRj6UI8VIq/MEJcFrKe35NTlTpoQFdwuNTIfphoVRIilpX85ZM/TqqjmrttyjVlhIM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=y5HL4iWgs9yRwaE53UqZayC8kmQQ+nLm2AG3GUNe8svSplMjrionIfgGPNDRIxB/XA3QoJ5QFRI2P3JxGUqpQfW6Wi8eXOY8oG7MMk/yjfAcaDMdUuRMdZruU37N23dTm+9WE01Cv81feBV+BGTDgqWBDeBhLM0U06woQOWQ/ws=; Message-ID: <959444.19294.qm@web30502.mail.mud.yahoo.com> X-YMail-OSG: WjrVBv0VM1m6.y0xG5.IuJ9sXbB9pHoarJkf5dB72uCWo6s aSRpbM5D1gN2gLUCt9nHtvQJGTKlAVBT4boLAAbgMsZSd_qqk7M6Rl5EmSMF HXA0oLabqmEUA9L6jL_ctJz3MJ12G8HiaFPvAVqTQwtkcOtqjdGARxTF_Gzo QIm021zNuaJsQ1iXZjurhNYYtqMRJmauHZ29uY8eDfuD8j9L5rEXaKvvtAjV 5obgqA1zwRL9DkGrquvIUUUL11dUp3sa780bc01CaCzeWT_pAAzV7eLJn7Re 4Ueys06le0Lgd9f0VYcqCen9pgb3Q6ix9H2Orfe5TBdA2PGY3xULbfalLgvH 6s_pvjxY08kt5i31V_n2JaEvJGHQYGYE8yyP5Vdas4YiulQdA_1yJjQ-- Received: from [212.143.35.226] by web30502.mail.mud.yahoo.com via HTTP; Mon, 10 Jan 2011 09:56:36 PST X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Mon, 10 Jan 2011 09:56:36 -0800 (PST) From: sol myr Subject: Newbie question: optimized files? To: java-user@lucene.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-50149549-1294682196=:19294" X-Virus-Checked: Checked by ClamAV on apache.org --0-50149549-1294682196=:19294 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=20 I'm new to Lucene (using 3.0.3), and just started to check out the behavior= of the 'optimize()' method (which is quite important for our application). Could it be that 'optimize' cancels out the 'compoundFile' mode? Or am I do= ing something wrong?=20 Here's my test: I create an indexWriter with compoundFile=3Dtrue, then perf= orm some writes+commits (which generates several 'cfs' files). Then I call 'optimize()'... I expected this to yield a single optimized 'cf= s' file, but instead I get lots of different files - 'fdt', 'fdx', 'fnm' et= c... The detailed code: // Create indexWriter with 'compoundfile=3Dtrue': Version version=3DVersion.LUCENE_30; Directory dir =3D FSDirectory.open(new File("c:/luceneTemp")); Analyzer analyzer =3D new StandardAnalyzer(version); IndexWriter writer =3D new IndexWriter( =A0=A0=A0=A0=A0=A0=A0=A0 dir, analyzer, true, IndexWriter.MaxFieldLength.LI= MITED); writer.setUseCompoundFile(true); // Perform some writes + commits. // This yields several 'cfs' files as expected: writer.addDocument(...); writer.commit(); writer.addDocument(...); =0Awriter.commit(); Thread.sleep(20000);=A0 // give myself time to see the generated 'cfs' file= s // Optimize - why does it yield lots of separate files ('fdt', 'fdx', etc)? writer.optimize(); Thanks. =0A=0A=0A --0-50149549-1294682196=:19294--