Skip to content

Instantly share code, notes, and snippets.

@lindstromhenrik
Last active December 23, 2015 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lindstromhenrik/6699210 to your computer and use it in GitHub Desktop.
Save lindstromhenrik/6699210 to your computer and use it in GitHub Desktop.
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