Is it possible to put an update SQL command inside db-data-config.xml used for indexing in solr?
I need to save the last successful solr indexing date stamp in a database column. If I can include an update SQL command as part of the solr db-data-config.xml file I could accomplish this.
Is there an alternative to this requirement?
You cannot do it directly in the db-data-config.xml. What you can do is to use the EventListener. To do this you have to write a class that inherits the EventListner-interface and execute your update command on: ‘onEvent’. In the event you will have access to the context params so you could make it generic and read your command from the configuration file.
To do this create a EventListner:
and register it in the db-data-config.xml: