Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
List indices (docs/size)
$.ajax
({
type: "GET",
url: "https://server/_status",
dataType: 'jsonp'
}).done(function(data) {
for(indexName in data.indices)
{
$('#indices').append('<div><span>' + indexName + '</span>&nbsp;<span>' + data.indices[indexName].docs.num_docs + '</span>&nbsp;<span>' + data.indices[indexName].index.primary_size +'</span></div>');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment