lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M, Arjun (NSN - IN/Bangalore)" <arju...@nsn.com>
Subject RE: Error enquiry- exceeded limit of maxWarmingSearchers=2
Date Thu, 29 May 2014 13:52:23 GMT
Thanks Shawn... Just one more question..

Can both autoCommit and autoSoftCommit be enabled? If both are enabled, which one takes precedence?

Thanks & Regards,
        Arjun M


-----Original Message-----
From: ext Shawn Heisey [mailto:solr@elyograg.org] 
Sent: Thursday, May 29, 2014 7:02 PM
To: solr-user@lucene.apache.org
Subject: Re: Error enquiry- exceeded limit of maxWarmingSearchers=2

On 5/29/2014 4:18 AM, M, Arjun (NSN - IN/Bangalore) wrote:
> 	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>

The code snippet does not include a commit.

I am not really clear on what using a value of -1 would do on maxTime
here.  I suspect that it efectively disables autoSoftCommit.  If that's
the case, then there is nothing at all in your code or your config that
will open a new searcher -- that option is set to false in your autoCommit.

If you want Solr to automatically do commits to make documents visible,
I think you should configure a maxTime value for autoSoftCommit, and
make it as long as you can possibly stand to not have new documents
available.  Then you won't have to worry about commits in your code at all.

> Few more questions.. 
> 
> 2) If I use solrServer.add(<Doc list>,<commitwithin>), should I do solrServer.commit()
also

No.  The commitWithin would do a soft commit for you once that much time
has elapsed since indexing started (or the last commit with
openSearcher=true), so you would not need to do a commit().

My opinion is that you should not combine manual commits with
autoSoftCommit.  Depending on exactly what your needs are, you might
want to use commitWithin, and have autoSoftCommit as a last guarantee
against errors in your indexing process.

Thanks,
Shawn


Mime
View raw message