Friday 15 February 2013

solr4 - Is there a way to trigger a notification when a document is add/updated/committed in Solr 4.7 -



solr4 - Is there a way to trigger a notification when a document is add/updated/committed in Solr 4.7 -

i have been searching way implement hook/callback/event in solr in order notified when document added/updated/committed. right now, thinking might have parse logs, nice able implement module/plugin if exists. have looked through javadoc 4.7, not seeing anything. saw realtimeget, seems not looking for.

are there hooks available built-in solr, or going have roll-my-own using logs determine has been changed in index?

you can run executable on postcommit , utilize timestamp field (like arun suggesting) if need be

<!-- runexecutablelistener executes external command. exe - name of executable run dir - dir utilize current working directory. default="." wait - calling thread waits until executable returns. default="true" args - arguments pass program. default=nothing env - environment variables set. default=nothing --> <!-- postcommit event fired after every commit --> <listener event="postcommit" class="solr.runexecutablelistener"> <str name="exe">snapshooter</str> <str name="dir">solr/bin</str> <bool name="wait">true</bool> <!-- <arr name="args"> <str>arg1</str> <str>arg2</str> </arr> <arr name="env"> <str>myvar=val1</str> </arr> --> </listener> </updatehandler>

see documentation

solr solr4

No comments:

Post a Comment