@@ -0,0 +1,1857 @@
+/* $Id$%0A * $Revision$%0A * $Date$%0A * $Author$%0A *%0A * The Netarchive Suite - Software to harvest and preserve websites%0A * Copyright 2004-2012 The Royal Danish Library, the Danish State and%0A * University Library, the National Library of France and the Austrian%0A * National Library.%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA%0A */%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.apache.lucene.index.IndexReader;%0Aimport org.apache.lucene.store.FSDirectory;%0A%0Apublic class ShowIndexStats %7B%0A%0A    /**%0A     * @param args The full path of the index%0A     * @throws IOException %0A     */%0A    public static void main(String%5B%5D args) throws IOException %7B%0A        String path = null;%0A        if (args.length != 1) %7B%0A            System.err.println(%22Missing path to the index%22);%0A            System.exit(1);%0A        %7D else %7B%0A            path = args%5B0%5D;%0A        %7D%0A        FSDirectory luceneDir = FSDirectory.open(new File(path));%0A        IndexReader r = IndexReader.open(luceneDir);%0A        System.out.println(%22Number of docs in index: %22 +  r.numDocs());%0A        System.out.println(%22Version: %22 + r.getVersion());%0A        luceneDir.close();%0A        r.close();%0A    %7D%0A%0A%7D

Add simple program to show #docs in given index and Lucene version of index.