php of jquery to access solr?

£可爱£侵袭症+ 提交于 2019-12-11 16:43:34

问题


im a beginner in using solr.

i know that you can either use ajax solr or solr-php-client to get the search results from solr.

but which should i use or are there occasions you have to choose one of them?

for example, which one is a better solution for autocompletion and which one is better for search content in threads?

would appreciate if someone could shed a light on this.


回答1:


  • Use PHP (or another server side language) for essential functionality.
  • Use client side JS for optional extras.
  • Build on stuff that works.



回答2:


If you use SolrJS you're exposing your Solr instance to the world, so you need to make sure you disable the update handler. With solr-ajax you can set up a proxy to avoid this.

See Security concerns for details, also: http://wiki.github.com/evolvingweb/ajax-solr/comparison-to-solrjs




回答3:


For auto-completion, AJAX is the only valid option. As for searching threads, either way would be acceptable.



来源:https://stackoverflow.com/questions/1900474/php-of-jquery-to-access-solr

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