Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 110EA10EA9 for ; Thu, 19 Dec 2013 00:35:20 +0000 (UTC) Received: (qmail 47347 invoked by uid 500); 19 Dec 2013 00:35:18 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 47265 invoked by uid 500); 19 Dec 2013 00:35:17 -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 47257 invoked by uid 99); 19 Dec 2013 00:35:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 00:35:17 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.180] (HELO mail-vc0-f180.google.com) (209.85.220.180) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Dec 2013 00:35:13 +0000 Received: by mail-vc0-f180.google.com with SMTP id ia6so67427vcb.11 for ; Wed, 18 Dec 2013 16:34:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=a98Q4CEipKPfsoGBkrWTBcSsE2ZobVjKeqh+ledxZBM=; b=TYvKdaEmY4/mIxqK4+e6tNqKft6P4jVRs29gdkXkyifL5ZxM4S3Mcl52qzZpVXDgdA yhR0w8KHQZRZtCAd1N/+5rvLW7h+gN6/rni9+qimkz9PJJV/TjkWhvtbcyMza+o7+VF+ v78xAz2J8xicU+lagjD1QvvmMHv3zwp1AhYqpr5n36k2gz/L3blEdNHxg6G5VF4p6ep4 BXzZ66y87S4fn29KhhgIRZ8XRCAa2EsMjGnYVt73Cje1FLEMDOYnMI5TyH7vkVPRS2SE P+uIA6OR3aTfDa9gw9AYD5/uXRausjWXQZ0h5N5hhpju+XKYyFWmQ1Vbj8UKZgt4AVdy 6ynQ== X-Gm-Message-State: ALoCoQkPwgCbV1RM0Dc7jQxbMj54YDdXw017XqsHx083w9mm4pdG2qHq6lCv/Przxm9xO02khFUZ X-Received: by 10.58.39.97 with SMTP id o1mr14221888vek.15.1387413292530; Wed, 18 Dec 2013 16:34:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.88.13 with HTTP; Wed, 18 Dec 2013 16:34:32 -0800 (PST) In-Reply-To: <7276923E6E5AA04C97876BF29FF86716FA494B0C@jobdivaexmb1.jobdiva.local> References: <7276923E6E5AA04C97876BF29FF86716FA494B0C@jobdivaexmb1.jobdiva.local> From: Michael McCandless Date: Wed, 18 Dec 2013 19:34:32 -0500 Message-ID: Subject: Re: Index Size in bytes To: Lucene Users Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Use Directory.listAll to get all files, then visit each one and call Directory.fileLength, and sum those up? Note that this gives you total size of all commit points, which may be over-counting on Windows in cases where IndexWriter has removed old commit points but IndexReaders still have the files open. Mike McCandless http://blog.mikemccandless.com On Wed, Dec 18, 2013 at 5:16 PM, Siraj Haider wrote: > How can I get the size of the whole index in bytes? > > regards > -Siraj > (212) 306-0154 > > > ________________________________ > This electronic mail message and any attachments may contain information = which is privileged, sensitive and/or otherwise exempt from disclosure unde= r applicable law. The information is intended only for the use of the indiv= idual or entity named as the addressee above. If you are not the intended r= ecipient, you are hereby notified that any disclosure, copying, distributio= n (electronic or otherwise) or forwarding of, or the taking of any action i= n reliance on, the contents of this transmission is strictly prohibited. If= you have received this electronic transmission in error, please notify us = by telephone, facsimile, or e-mail as noted above to arrange for the return= of any electronic mail or attachments. Thank You. --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org