solrnet soft commit question

269 views
Skip to first unread message

Houman Ghahremanlou

unread,
May 12, 2016, 4:04:04 PM5/12/16
to SolrNet
Hi Everyone,

I have a few questions

1) The solrnet add method: Add(T doc); If that's used in a code to add a document but doesn't have a commit afterwards. Is that treated by Solrnet/solr as a Soft Commit ? Or do I need to use

Add(T doc, AddParameters parameters); with CommitWithin parameter ?


2) If I used the method AddRange(IEnumerable<T> docs) to add multiple docs, followed by commit() , is that treated a hard comit ?


3) Does solrnet override <autoCommit> & <autoSoftCommit> parameters in solrconfig.xml schema ? If not under what condition those schema values are taken into consideration


4) I am running into a situation where I am hitting this exception on write solr instance : rg.apache.solr.common.SolrException: Error opening new searcher. exceeded limit of maxWarmingSearchers=2,​ try again later.

I have noticed by upping the maxWarmingSearchers to 4 or 8, I can get less of these (probably many commits happening in parallel), would going to soft commit help with this issue as well ?


This is on SolrNet v.0.4.0.2002


Thanks,
Houman

Mauricio Scheffer

unread,
May 12, 2016, 5:51:23 PM5/12/16
to sol...@googlegroups.com
1) Add() only sends an <add/> ( https://wiki.apache.org/solr/UpdateXmlMessages#add.2Freplace_documents ), nothing else.

2) Commit() is a <commit/> which is a hard commit.

3) If you define commitWithin parameters when adding documents, then yes, that overrides the autocommit configuration.


Cheers




--
Mauricio

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at https://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

Houman Ghahremanlou

unread,
May 12, 2016, 6:34:19 PM5/12/16
to SolrNet
Thanks Mauricio

For #1 - If Add() only sends an <add/> does the <autoCommit> configuration ever come into equation, i.e. it is currently set to 60 seconds ? Wondered if it would commit at that time.

For #3 did you mean 'overrides the "softCommit"' for the commitWithin ?

Thanks,
Houman

Mauricio Scheffer

unread,
May 12, 2016, 6:42:58 PM5/12/16
to sol...@googlegroups.com
Yes, if configured autoCommit will work as usual after an add. The time is whatever you've set it to in your Solr instance.
I did not mean "override the softCommit" for commitWithin. See https://wiki.apache.org/solr/CommitWithin for reference.

Cheers






--
Mauricio

Houman Ghahremanlou

unread,
May 12, 2016, 6:51:47 PM5/12/16
to SolrNet
Gotcha!

I was actually looking at that page earlier and it made sense.

I am a little bit confused still about the <autoCommit> & <autoSoftCommit> configurations in the solrconfig.xml in what conditions are they used ? are those for HTTP and SolrJ queries ?

I understood that if you an Add() in SolrNet w/o Commit, the <autoCommit> maxTime is used to commit (based on your previous reply)

Under what condition (or call from SolrNet) the <autoSoftCommit>'s maxTime is used ?

Hope I make sense,

Thanks,
Houman
Reply all
Reply to author
Forward
0 new messages