I'm currently trying to find a good way to notify me if some documents in my index have changed. Now some questions came up, and I hope someone can help me here. I'm using Solr 6.2.1.
The SolrEventListener Interface has the methods postCommit() and postSoftCommit(), but in the documentation (http://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-6.2.pdf) there are only informations about the two events "postCommit" and "postOptimize".
How are these related? I only managed to get triggered postCommit() on "postCommit", but I would like to get a notification on every soft-commit. I figured that is the postSoftCommit() method for, but i could not find any event to trigger a call to this method. And just for curiosity, what triggers "postOptimize"?
Also, am I right with the assumption that even, if i set autoCommit and autoSoftCommit, they only get triggered if there are actual changes?
Is there a possibility to find out how many documents have changed since the last commit?
I'm of course also open to other suggestions how to achieve this behavior.
EDIT for clarity:
If i add the fallowing to my solrconfig.xml
<listener event="postCommit" class="com.solr.plugins.event.NotifyChangesEventListener"/>
com.solr.plugins.event.NotifyChangesEventListener.postCommit() gets called as expected.
But what is the right event, so that com.solr.plugins.event.NotifyChangesEventListener.postSoftCommit() gets called?
I tried
<listener event="postSoftCommit" class="com.solr.plugins.event.NotifyChangesEventListener"/>
but it did not have any effects.
And what method gets called if I add
<listener event="postOptimize" class="com.solr.plugins.event.NotifyChangesEventListener"/>