How to add docs to Solr using PHP?

随声附和 提交于 2020-01-16 18:31:11

问题


I've got Solr set up on my server, and a test collection loaded.

Without installing anything else, I can search the collection fine using the Solr URL and JSON decoding file_get_contents($url).

In order to add/update/delete documents, do I need to install a PHP Solr client? Or is there a native way that is standard to use? If the former, is this the one to install?: http://www.php.net/manual/en/book.solr.php - or can you recommend another and why?


回答1:


Check the below links :

Integrate SOLR - wiki

SOLR PHP - Official Client Library

Link to download SOLR php client library




回答2:


In my company we've been successfully using the native Solr client for PHP that you've mentioned for a while now. I also found Solarium helpful, however it has it's limitations, so it might be worth looking into using HTTP request tools like Guzzle, Httpful and such.



来源:https://stackoverflow.com/questions/19695675/how-to-add-docs-to-solr-using-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!