在MySQL更新后触发SOLR更新 [英] trigger SOLR update after MySQL update
问题描述
我打算使用SOLR进行全文搜索。问题:当我更新我的MySQL数据库,有没有办法触发SOLR更新我更新我的数据库后,所以数据将完全相同在MySQL和SOLR? DataImportHandler?还是UpdateHandler?我使用PHP,有时大约有100个插入/更新/删除查询/分钟(不总是)。
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).
推荐答案
你可以在更新数据库时调用Solr从PHP中更新数据,或者你可以设置cron作业。
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.
他们计划添加调度器做Solr: a href =http://wiki.apache.org/solr/DataImportHandler#Scheduling =nofollow> http://wiki.apache.org/solr/DataImportHandler#Scheduling
They are planning to add scheduler do Solr: http://wiki.apache.org/solr/DataImportHandler#Scheduling
这篇关于在MySQL更新后触发SOLR更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!