How to implement a simple search function

Source: Internet
Author: User
You can enter your nickname, mobile phone number, question content, and email address in the search box of a background search function, is there any way to improve efficiency in different tables? One background search function
Enter your nickname, mobile phone number, question content, and email address in the search box.
Some contents have different dimensions and are also in different tables.
Is there any way to improve efficiency?

Reply content:

One background search function
Enter your nickname, mobile phone number, question content, and email address in the search box.
Some contents have different dimensions and are also in different tables.
Is there any way to improve efficiency?

If the data volume is small, you can create a full-text search table in the database to store the data you need to query. If the data volume is large, you can use open-source search tools, such as lucene. The lucene-based solr is also quite simple.

Oh, it hurts.
Simple-brainless method: drop all the content to be included in the cable collection into a table. The disadvantage is that the cable receiving speed is slow when the data volume is large.

The third is the use of third-party cable collecting software. For php, you can use tools such as sphinx. It is easy to implement and can also be segmented. The disadvantage is that it is a little troublesome to configure, And the dictionary should be maintained by itself. However, this type is recommended.

For full-text search, try domestic search

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.