solr - SolrJ and Auto Commit -


i adding documents solr 4.3 core using solrj api , noticed have autocommit set 15 seconds in stock solrconfig using below.

 <autocommit>    <maxtime>${solr.autocommit.maxtime:15000}</maxtime>    <opensearcher>false</opensearcher>  </autocommit> 

my undestanding since auto commit set true means solr instance auto commiting anyhow every 15 seconds, not need commit explicity using solrj api in below everytime add document solr , understanding correct ?

        httpsolrserver.add(doc1);         httpsolrserver.commit();// still needed ? 

thanks in advance!

if have auto-commit defined, don't need explicit commit.

however, in definition above, have opensearcher set false (hard) commit. means, solr commit not show changes.

in example configuration works because there autosoftcommit commit opensearcher set true (or true default). make changes show without doing expensive hard commit.

together 2 sections work seeing results fast , periodically saving disk. make sure have both sections or reopen searcher in 1 above. doing 1 out of 2 cause results never show unless explicit commit somewhere else.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -