Home > Backend Development > PHP Tutorial > Introduction to Sphinx_PHP Tutorial

Introduction to Sphinx_PHP Tutorial

WBOY
Release: 2016-07-13 10:31:02
Original
1243 people have browsed it

Introduction to Sphinx_PHP TutorialWhat is full-text search?

Full-text retrieval refers to an information retrieval technology that uses all text information of a document as the retrieval object. The search 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 a SQL-based full-text search engine that can be combined with MySQL and PostgreSQL for full-text search. It can provide more professional search functions than the database itself, making it easier for applications to implement professional full-text search. Sphinx specially designs search API interfaces for some scripting languages, such as PHP, Python, Perl, Ruby, etc., and also designs a storage engine plug-in for MySQL.

Sphinx single index can contain up to 100 million records, and the query speed for 10 million records is 0.x second (millisecond level). The speed of index creation by Sphinx is: it only takes 3 to 4 minutes to create an index of 1 million records, and it can be completed in 50 minutes to create an index of 10 million records. An incremental index containing only the latest 100,000 records needs to be rebuilt once. It only takes tens of seconds.

Let’s take a look at a more common php + mysql + Introduction to Sphinx_PHP Tutorial search engine architecture diagram:

php + mysql + Introduction to Sphinx_PHP Tutorial 搜索引擎架构图

What features does Sphinx have?

High-speed indexing (nearly 10 MB/sec on newer CPUs);
High-speed search (average query speed is less than 0.1 seconds for 2-4G text volume);
High availability (single CPU can support up to 100 GB of text and 100M documents);
Provides good relevance ranking
Support distributed search;
Provide document summary generation;
Provides search from plug-in storage engine within MySQL
supports boolean, phrase, and word proximity queries;
Support multiple full-text search fields per document (default maximum 32);
Support multiple attributes per document;
Support word segmentation;
Support single-byte encoding and UTF-8 encoding;
supports English stemming, Russian stemming, and Soundex for morphology;
Support MySQ (both MyISAM and InnoDB tables are supported);
Support PostgreSQL.

For more detailed tutorials, please refer to: php official Introduction to Sphinx_PHP Tutorial documentation

Articles you may be interested in

  • Sphinx is installed and used under windows [supports Chinese full-text search]
  • The usage and difference of using break, continue, goto, return and exit to break out of multiple loops in PHP
  • How to determine whether the current operating system is linux or windows in php
  • echo, print in php , the usage and difference of print_r, var_export, var_dump
  • php searches whether a certain value exists in the array (in_array(), array_search(), array_key_exists())
  • Introduction to Sphinx_PHP Tutorial Chinese full text search Implement
  • Usage of several keywords such as $this, static, final, const, self, etc. in php
  • How to simulate ping command in php

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764157.htmlTechArticleWhat is full-text search? Full-text retrieval refers to an information retrieval technology that uses all text information of a document as the retrieval object. The search object may be the title of the article, or it may be the text...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template