Search code examples
solrsunspot

Get SOLR index size


I am using Sunspot (Ruby/Rails) on top of SOLR in my webapp. Now I run into problems when SOLR hits Java heap space. I cannot figure out how to find the SOLR index size? Is there a way to find this out from command-line?


Solution

  • If you are looking for the physical on-disk size of the index, you can look at 'data/index' folder under 'dataDir' per the definition in solrconfig.xml. For eg. in example index, it is example/solr/data/index folder.

    If you are looking for count of the documents, then you can either look at stats.jsp page or search for ":".

    If you are looking for understanding memory usage, you can start with the stats.jsp - and look at document count, various field cache size etc.

    I am afraid you will need to do more research to understand your memory requirements, profile the application and plan for capacity.