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

如何使用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

图片转代码服务由CSDN问答提供 功能建议

我正在研究PECL Solr扩展。 它适用于所有文档搜索和其他功能。 但是 我想将它与mysql db连接。

请建议执行相同操作的步骤,并且需要进行更改以实现此目的。

谢谢< / p>

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dongtiao5094
    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.

    点赞 评论

相关推荐