I'm planning to use SOLR for full-text search. Question: when I update my MySQL-database, is there any way to trigger a SOLR-update after I updated my database, so the data will be exactly the same in both MySQL and SOLR? DataImportHandler? Or UpdateHandler? I'm using PHP, and sometimes about 100 insert/update/delete-queries/minute (not always).
Asked
Active
Viewed 1,489 times
2 Answers
1
Either you call Solr to update data from PHP when you are updating DB or you can set up the cron job do do so.
They are planning to add scheduler do Solr: http://wiki.apache.org/solr/DataImportHandler#Scheduling

Fuxi
- 5,298
- 3
- 25
- 35
-
Hmm, I wrote the DIH Scheduler year and a half ago and added it to DIH wiki. I contributed the patch in June/2011 and it hasn't yet been incorporated into Solr, so if you're in a hurry I suggest you don't wait for it to appear in a Solr release. You can use the wiki code or patch to build your own JAR file and add it to Solr/lib/ext. – Marko Bonaci Jan 16 '12 at 08:18
0
Run a cron job in the background to perform a delta index of the database.

Mark O'Connor
- 76,015
- 10
- 139
- 185