java - Solr delay at document delete -


maybe got same problem , can me, when delete document there delay between solr index refresh , got still on list document deleted thans in advance

it looks using solrj updaterequest delete document. since not explicitly committing update, actual timing of index update depends on solr configuration. solr docs (https://cwiki.apache.org/confluence/display/solr/near+real+time+searching)

"a common configuration hard autocommit every 1-10 minutes , autosoftcommit every second"

if need make delete committed index right away, can add "commit" action updaterequest this:

updaterequest req = new updaterequest(); req.deletebyquery("documentid:"documentid); req.setaction(action.commit, false, true); 

this have same effect adding "?action=commit" update request , perform soft commit right away.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -