Sphinx introduction. What is full-text search? Full-text search is an information retrieval technology that uses all text information of a document as the retrieval object. The retrieved object may be the title of the article, or the text may be full-text retrieval?
Full-text search is an information retrieval technology that uses all text information of a document as the retrieval object. The retrieved object may be the title of the article, the author of the article, or the abstract or content of the article.
What is Sphinx?
Sphinx is an SQL-based full-text search engine that can be used in combination with MySQL and PostgreSQL for full-text search. It provides more professional search functions than the database itself, this makes it easier for applications to implement professional full-text retrieval. Sphinx specially designs Search API interfaces for some scripting languages, such as PHP, Python, Perl, and Ruby. It also designs a Storage Engine plug-in for MySQL.
Sphinx a single index can contain a maximum of 0.1 billion records. the query speed of 10 million records is 0. x seconds (in milliseconds ). The index creation speed of sphenders is: 3 to 3 for creating an index with 1 million records ~ In four minutes, you can create an index of 10 million records within 50 minutes, and only the incremental index containing the latest 0.1 million records takes dozens of seconds to recreate the index.
Next we will look at a common engine framework for searching php + mysql + sphinx:
What features does Sphinx have?
High-speed indexing (nearly 10 MB/s on the new CPU );
High-speed search (the average query speed of 2-4G text is less than 0.1 seconds );
High Availability (up to 100 GB of text and MB of documents can be supported on a single CPU );
Provides a good correlation ranking
Supports distributed search;
Generate document summaries;
Search from the plug-in storage engine in MySQL
Supports boolean, phrase, and word proximity queries;
Supports multiple full-text search domains for each document (up to 32 by default );
Multiple attributes of each document are supported;
Support word breaking;
Supports single-byte encoding and UTF-8 encoding;
Supports English stemming, Russian stemming, and Soundex for morphology;
Support for MySQ (both MyISAM and InnoDB tables are supported );
Supports PostgreSQL.
For more detailed tutorials, see the official php sphinx document.
Articles you may be interested in
- Install and use Sphinx in windows [Chinese full-text search is supported]
- Use break, continue, goto, return, and exit in multiple loops in PHP
- How does php determine whether the current operating system is linux or windows?
- Differences between echo, print, print_r, var_export, and var_dump in php
- Php searches for the existence of a value in the array (in_array (), array_search (), array_key_exists ())
- Implementation of sphsf-chinese full-text search
- Usage of several keywords such as $ this, static, final, const, and self in php
- Php ping command simulation method
Why? Full-text search is an information retrieval technology that uses all text information of a document as the retrieval object. The retrieved object may be the title or text of the article...