简体   繁体   中英

Some Q regarding SOLR and how it actually works!

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

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.

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