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, bu开发者_JAVA百科t for SOLR?
4- How are the search-parameters or search-criteria passed to SOLR?
Thanks
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.
精彩评论