简体   繁体   中英

How to connect to mysql using pecl solr extension?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM