doushen9863 2017-03-23 08:29
浏览 33
已采纳

如何使用pecl solr扩展连接到mysql?

I am working on PECL Solr extension. It is working fine for all the document search and other functionality. But i want to connect it with mysql db.

Please suggest steps to do the same and changes need to be done to implement this.

Thanks

  • 写回答

1条回答 默认 最新

  • dongtiao5094 2017-03-23 12:40
    关注

    Either you'll have to managed the connection to MySQL yourself - as you usually do when you handle data from MySQL. You then retrieve the data through MySQL and submit it to Solr using the Solr extension.

    The alternative is to use the DataImportHandler in Solr - this is completely separate from the solr pecl extension, as the functionality is built into Solr (and not the extension).

    The solr extension doesn't have any direct compatibility with MySQL, and is used only to communicate with Solr. You can trigger the data import handler by issuing a single http request with file_get_contents without having to go through the Solr extension.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大