I believe i can create a Solr index for data in RDBMS using dataImportHandler.
But I am not sure how to keep the index in sync when the table is updated (new data added,data deleted etc.)
I am using Solr for full-text search for a particular table in my database
You should update your solr index periodically or use an trigger to update solr, if your DB data are changed.
To update the SOLR index there are different ways:
1.) run an delta import: http://wiki.apache.org/solr/DataImportHandler#Using_delta-import_command
2.) run an full import without
clean=true(setclean=false)option http://wiki.apache.org/solr/DataImportHandlerDeltaQueryViaFullImportIt’s up to you. In my case, i prefer the 2nd way with FullImport and
clean=false