Re: cheking the size of the index using solrj API's
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.
Re: cheking the size of the index using solrj API's
If you're using ReplicitionHandler directly, you already have the xml from which to extract the 'indexSize' attribute. From a client, you can get the indexSize by issuing: http://hostname:8983/solr/core/replication?command=details This will give you an xml response. Use: http://hostname:8983/solr/core/replication?command=detailswt=json to give you a json string that has 'indexSize' within it: {responseHeader:{status:0,QTime:0},details:{indexSize:6.63 KB,indexPath:usr//bin/solr/core0/index,commits:[[indexVersion,1259974360056,generation,1572,filelist,[segments_17o]],[indexVersion,1259974360057,generation,1573,filelist,[segments_17p,_zv.fdx,_zv.fnm,_zv.fdt,_zv.nrm,_zv.tis,_zv.prx,_zv.tii,_zv.frq]]],isMaster:true,isSlave:false,indexVersion:1259974360057,generation:1573,backup:[startTime,Mon Apr 05 14:28:46 BST 2010,fileCount,17,status,success,snapshotCompletedAt,Mon Apr 05 14:28:47 BST 2010]},WARNING:This response format is experimental. It is likely to change in the future.} Either way, you'll need to have some sort of parsing logic or formatting to get just the index size bit.
Re: cheking the size of the index using solrj API's
On Fri, Apr 2, 2010 at 7:07 AM, Na_D nabam...@zaloni.com wrote: hi, I need to monitor the index for the following information: 1. Size of the index 2 Last time the index was updated. If by 'size o the index' you mean document count, then check the Luke Request Handler http://wiki.apache.org/solr/LukeRequestHandler ryan
cheking the size of the index using solrj API's
hi, I need to monitor the index for the following information: 1. Size of the index 2 Last time the index was updated. Although I did an extensive search of the API's i cant find something which does the same( as mentioned above) please help -- View this message in context: http://n3.nabble.com/cheking-the-size-of-the-index-using-solrj-API-s-tp692686p692686.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: cheking the size of the index using solrj API's
I need to monitor the index for the following information: 1. Size of the index 2 Last time the index was updated. Although I did an extensive search of the API's i cant find something which does the same( as mentioned above) solr/admin/stats.jsp is actually an xml converted to html with stats.xsl There are info about when last commit etc: stat name=openedAt Fri Apr 02 17:07:03 EEST 2010 /stat stat name=registeredAt Fri Apr 02 17:07:03 EEST 2010 /stat Also LukeRequestHandler shows last modified time in UTC solr/admin/luke?wt=xmlnumTerms=0 date name=lastModified2010-04-02T14:07:07Z/date I am not sure with the size. I can see it in stats.jsp because i have registered Replication Handler. stat name=indexSize 226.86 MB /stat