Home  >  Article  >  Backend Development  >  The process and operation code of PHP operating sphinx (picture and text)

The process and operation code of PHP operating sphinx (picture and text)

不言
不言Original
2018-08-15 16:47:271663browse

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:

php custom token class and put the generated token in the Authorization of the http request header code

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn