Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "Num Docs" and "Max Doc" in Solr

Tags:

solr

solrj

Can someone let me know what is the difference between Num Docs and Max Doc reported in Solr Admin?

I am seeing this difference in value after executing deleteByQuery from SolrJ. I am using Solr 5.2.1

enter image description here

like image 435
tuk Avatar asked Oct 18 '22 21:10

tuk


1 Answers

Max Doc indicates the count of document that exist before the update(delete).documents that existed in your index before update started(delete started)

Num Docs is the new count after the update i.e. the current count.

In your case you have delete operation where it deleted 2 documents.

And I guess you must be using DIH....where DIH deletes all docs and add them new again. and after DIH commits it will keep the new one and delete the older ones.

like image 68
Abhijit Bashetti Avatar answered Jan 04 '23 05:01

Abhijit Bashetti