Hi, Thanks for your valuable inputs... Find below my code and config in solrconfig.xml. Index update is successful but I am not able to see any data from solr admin console. What could be the issue? Any help here is highly appreciated.
I can see the data in the solr admin gui after tomcat restart(solr is running in tomcat in my case) private void addToSolr(List<SolrInputDocument> c) throws SolrServerException, IOException { if (!c.isEmpty()) { try { solr.add(c); logger.info("Commit size after Add=" + c.size()); } finally { //renew lock } } } autoCommit config in solrconfig.xml ===================================== <autoCommit> <maxTime>${solr.autoCommit.maxTime:15000}</maxTime> <maxDocs>10000</maxDocs> <openSearcher>false</openSearcher> </autoCommit> <autoSoftCommit> <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> </autoSoftCommit> Few more questions.. 2) If I use solrServer.add(<Doc list>,<commitwithin>), should I do solrServer.commit() also Thanks & Regards, Arjun M -----Original Message----- From: ext Shawn Heisey [mailto:s...@elyograg.org] Sent: Wednesday, May 28, 2014 6:36 PM To: solr-user@lucene.apache.org Subject: Re: Error enquiry- exceeded limit of maxWarmingSearchers=2 On 5/28/2014 3:45 AM, M, Arjun (NSN - IN/Bangalore) wrote: > Also is there a way to check if autowarming completed (or) how to make > the next commit wait till previous commit finishes? With Solr, probably not. There might be a statistic available from an admin handler that I don't know about, but as far as I know, your code must be aware of approximately how long a commit is likely to take, and not send another commit until you can be sure that the previous commit is done. This includes the commitWithin parameter on an update request. Now that I've just said that, you *can* do an all documents query with rows=0 and look for a change in numFound. An update might actually result in no change to numFound, so you would need to build in a time-based exit to the loop that looks for numFound changes. In the case of commits done automatically by the configuration (autoCommit and/or autoSoftCommit), there is definitely no way to detect when a previous commit is done. The general recommendation with Solr 4.x is to have autoCommit enabled with openSearcher=false, with a relatively short maxTime -- from 5 minutes down to 15 seconds, depending on indexing rate. These commits will not open a new searcher, and they will not make new documents visible. For commits that affect which documents are visible, you need to determine how long you can possibly stand to go without seeing new data that has been indexed. Once you know that time interval, you can use it to do a manual commit, or you can set up autoSoftCommit with that interval. It is not at all unusual to have an autoCommit time interval that's shorter than autoSoftCommit. This blog post mentions SolrCloud, but it is also applicable to Solr 4.x when NOT running in cloud mode: http://searchhub.org/2013/08/23/understanding-transaction-logs-softcommit-and-commit-in-sorlcloud/ Thanks, Shawn