trigger SOLR update after MySQL update(MySQL更新后触发SOLR更新)
问题描述
我打算使用 SOLR 进行全文搜索.问题:当我更新我的 MySQL 数据库时,有没有什么方法可以在我更新我的数据库后触发 SOLR 更新,从而使 MySQL 和 SOLR 中的数据完全相同?数据导入处理器?还是更新处理器?我正在使用 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.
他们计划添加调度程序 do Solr:http://wiki.apache.org/solr/DataImportHandler#Scheduling
They are planning to add scheduler do Solr: http://wiki.apache.org/solr/DataImportHandler#Scheduling
这篇关于MySQL更新后触发SOLR更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:MySQL更新后触发SOLR更新


- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01