I am using solr 6.1.0. We have 2 shards and each has one replica. I want to insert 100 documents in one collection. I am using below code.
org.apache.solr.client.solrj.impl.CloudSolrClient cloudServer = new org.apache.solr.client.solrj.impl.CloudSolrClient(zkHost); cloudServer.setParallelUpdates(true); cloudServer.setDefaultCollection(collection); I have 2 ways to add the documents. single or batch 1) cloudServer.add(SolrInputDocument); //loop of 100 documents 2) cloudServer.add(List<SolrInputDocument>); // 100 documents Note: we are not using cloudServer.commit from application. we used below configuration from solrconfig.xml <autoCommit> <maxTime>600000</maxTime> <maxDocs>20000</maxDocs> <openSearcher>false</openSearcher> </autoCommit> <autoSoftCommit> <maxTime>1000</maxTime> </autoSoftCommit> <maxWarmingSearchers>2</maxWarmingSearchers> Which one is better for performance oriented single or batch? which one is faster for commit process? Regards, Vishal <http://aka.ms/weboutlook>