Search code examples
solrmetricssolr6

Solr 6 metrics - core stats


I'm trying to use the metrics api to get general info for a core. I'm looking for the info displayed in the overview section of the admin page: num docs, max doc, heap memory usage, deleted docs and number of segments.

Is there a way to access that via the metrics api?

Also, I would be very happy to have the last commit and last soft commit dates.


Solution

  • If you just want the info shown in the Admin interface, you can use the same endpoint as the admin interface - watch the network tab under your browser's developer tools as you navigate the interface. The interface is purely display oriented, all the data comes from API endpoints exposed in Solr.

    For core information this is by default:

    http://localhost:8983/solr/admin/cores?wt=json