Thank you for your question about sorting by keyword density ~

Source: Internet
Author: User
Tags php mysql
Thank you for your question about sorting by keyword density ~ Php mysql apache
This is probably the case.
Table to be searched
Id title url content
-------------------------------------------------------------
0 la http: // a r3453
1. have a drink. http: // B 34543
2. la fun http: // c 435345

You only need to search for the title field.

For example, I search for "Eat, drink, and play"

The result is as follows: (match multiple keywords to the front)


Have fun
Drinking and eating...
La la

Thank you so much for your advice ~ Thank you.


Reply to discussion (solution)


I forgot to talk about how to write SQL statements ~

We recommend that you do not use SQL. use sphek (Coreseek) to meet your needs and sort by weight. Here: http://www.coreseek.cn/


Sphinx knows this thing, because I am not a pure programmer, and I am not very familiar with the program.

Is it a bit cool to use this ~

Now, your function is not a chicken, but a cow. When the number of concurrency comes up, this is implemented using SQL, and your database may not be able to resist it.

It seems very troublesome to say something about Sphinx.

Mysql full-text index

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.