Home > Article > Backend Development > The process and operation code of PHP operating sphinx (picture and text)
The content of this article is about the process and operation code of PHP operating sphinx. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
The general process is as follows:
1. php connects to sphinx and finds the id set with keyword records from the index file;
2.php connects to the database, Query the records with ID in collection 1 from the database.
The operation code is as follows:
1. To get the id set with keywords from the index file, you need to use sphinxapi
2. According to the id set, check the records from the database
$sql1 = "select * from rain_news where id IN ($ids) ";
Execute this sql statement That’s it
Related recommendations:
thinkphp5 Summary of problems encountered during server deployment
The above is the detailed content of The process and operation code of PHP operating sphinx (picture and text). For more information, please follow other related articles on the PHP Chinese website!