On 7/15/2013 3:08 AM, Federico Ragona wrote: > Hi, > > I'm trying to write a validation test that reads some statistics by > querying > Solr 4.3 via HTTP, namely the number of indexed documents (`numDocs`) > and the > number of pending documents (`pendingDocs`) from the Solr4 cluster. I > believe > that in Solr3 there was a `stats.jsp` page thtat offered both numbers. > > Is there a way to get both fields in Solr4?
Solr4 should have all the stats that Solr3 has and then some. If you select your core from the core selector, then click on Plugins / Stats, click on UPDATEHANDER, then open updateHandler on the right, I think you'll find at least some of what you were looking for. Other parts of what you were looking for might be found on the Overview for the core. If you have the default core named "collection1" then a URL like this one will get you there. You can replace "collection1" with the name of your core. The "/#/" in this URL indicates that it is part of the admin UI, not something you'd want to query in a program: http://server:port/solr/#/collection1/plugins/updatehandler?entry=updateHandler The admin UI gathers most of its core-level information from the mbeans handler found in the core itself. The following URL is suitable for querying in a program. Note the "collection1" in this URL as well: http://server:port/solr/collection1/admin/mbeans?stats=true This will default to XML output. Like most things in Solr, if you add &wt=json to the URL, you'll get JSON format. You can also add &indent=true for human readability. Thanks, Shawn