Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the size of a Solr document?

Tags:

solr

solr4j

I would like to know the size in bytes of individual Solr documents/responses. Is there a straightforward way to figure this out?

We are using the solrj java client.

I've looked around and have only found ways to determine the size of the index, but nothing on the size of the documents themselves.

like image 290
user3246328 Avatar asked May 14 '14 16:05

user3246328


1 Answers

the size and the document of solr are composed of both : - indexes compressed - files compressed

A easy way to know the size of you solr core / node is to get in solr admin enter image description here

So in my case we have : 2993 document for 5,41 MB = an average of 1,8KB / document including the index / and the stored fields.

There is also another way if you are more geeky and love to code : how to get the Index Size in solr

UPDATE THE 5/06/2014 : Hehe, I've found something that sound good : [ MAT tool3 You can lookup the lru cache in order to understand the memory used (and the space used by a specific doc). By running a get of the ID, you will have the ID retrieved and the memory taken by the ID on HDD/RAM! :)

See this great article :

  • MAT usage ,
  • MAT .
like image 187
jeorfevre Avatar answered Sep 20 '22 00:09

jeorfevre