lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Na_D <nabam...@zaloni.com>
Subject Re: cheking the size of the index using solrj API's
Date Mon, 05 Apr 2010 12:36:58 GMT

 hi,
 
   I am using the piece of code given below
             
          ReplicationHandler handler2 = new ReplicationHandler();
                 System.out.println( handler2.getDescription());
                 
                 
                 NamedList statistics = handler2.getStatistics();
                 System.out.println("Statistics   "+ statistics);

The result that i am getting (ie the printed statment is :
Statistics  
{handlerStart=1270469530218,requests=0,errors=0,timeouts=0,totalTime=0,avgTimePerRequest=NaN,avgRequestsPerSecond=NaN}


But the Statistics consists of the other info too:

<class>
        org.apache.solr.handler.ReplicationHandler
      </class>
      <version>
        $Revision: 829682 $
      </version>

      <description>
        ReplicationHandler provides replication of index and configuration
files from Master to Slaves
      </description>
      <stats>

        <stat name="handlerStart" >
          1270463612968
        </stat>

        <stat name="requests" >
          0
        </stat>

        <stat name="errors" >
          0
        </stat>

        <stat name="timeouts" >
          0
        </stat>

        <stat name="totalTime" >
          0
        </stat>

        <stat name="avgTimePerRequest" >
          NaN
        </stat>

        <stat name="avgRequestsPerSecond" >
          0.0
        </stat>

        <stat name="indexSize" >
          19.29 KB
        </stat>

        <stat name="indexVersion" >
          1266984293131
        </stat>

        <stat name="generation" >
          3
        </stat>

        <stat name="indexPath" >
          C:\solr\apache-solr-1.4.0\example\example-DIH\solr\db\data\index
        </stat>

        <stat name="isMaster" >
          true
        </stat>

        <stat name="isSlave" >
          false
        </stat>

        <stat name="confFilesToReplicate" >
          schema.xml,stopwords.txt,elevate.xml
        </stat>

        <stat name="replicateAfter" >
          [commit, startup]
        </stat>

        <stat name="replicationEnabled" >
          true
        </stat>

      </stats>
    </entry>



this is where the problem lies : i need the size of the index im not finding
the API
nor is the statistics printing out(sysout) the same.
how to i get the size of the index???? 
-- 
View this message in context: http://n3.nabble.com/cheking-the-size-of-the-index-using-solrj-API-s-tp692686p697603.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message