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.


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

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


谢谢< / p>

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

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.

    解决 无用
    打赏 举报

相关推荐 更多相似问题