doushan9415 2010-01-11 11:30
浏览 37
已采纳

关于SOLR及其实际工作方式的一些问题!

I have a classifieds website, and I have currently around 100thousand ads in a mysql table.

I am using php to fetch results and to display them on a page. However, I am noticing the searches getting slower and slower. That is why I am planning on installing and using SOLR, as I have heard good things about it.

But to my suprise, I haven't found much information on how it works exactly... Please answer these Q about SOLR and provide me with the most information you can about how it works:

1- Is SOLR the same as a mysql table, only faster?

2- On a site which uses mysql to show ads, insert ads, search ads etc, would all the mysql need to be 'bypassed' to some SOLR function which is similiar as the mysql function? To clarify, here is an example: If I use "SELECT * FROM table WHERE id=$id" as a query-string to query the table, would I then have to use some other function which is similiar to this, but for SOLR?

3- When users 'insert ads' they are inserted into the mysql table, is there a function for this as well, but for SOLR?

4- How are the search-parameters or search-criteria passed to SOLR?

Thanks

  • 写回答

1条回答 默认 最新

  • doz59484 2010-01-11 12:47
    关注

    Lucene is a fulltext indexing service and a search engine. SOLR is a service built upon Lucene, which allows you to access it, for example from PHP. SOLR is implemented in Java, and it offers a web-service interface for integration from PHP. Alternatively you can use a native PHP-implementation of the search engine, however the Java implementation (which SOLR uses) is much faster and feature-rich.

    You generally use Lucene/SOLR as a supplement to a relation database (Such as MySql). The typical use case is that you issue a query to the Lucene index, which returns an ID. This ID can then be used to find the related entry in your database.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题