Simple tutorial for PHP full-text search function quickly under innodb Engine [xunsearch-based ],

Source: Internet
Author: User

Simple tutorial for PHP full-text search function quickly under innodb Engine [xunsearch-based ],

This example describes how to quickly create a full-text search function for PHP under the innodb engine. We will share this with you for your reference. The details are as follows:

Devices to be prepared: Liunx (Centos) Operating System (Linux only) and PHP environment.

Here we will introduce an open-source search engine project developed by Chinese people, called xunsearch, which can be divided into index servers and search servers.

Pleasant server creation in CentOS

wget http://www.xunsearch.com/download/xunsearch-full-latest.tar.bz2tar -xjf xunsearch-full-latest.tar.bz2

Ready to install

Cd xunsearch-full-1.3.0/sh setup. sh // here you can encounter problems with installation failure because gcc-c ++ is not installed. It is very easy to install with yum

During installation, enter the installation directory. Generally, press/usr/local/xunsearch and then press Y to enter the installation directory ..

Wait until the installation is complete.

After the installation is complete, how can I access the service across servers:

Installation Directory (/usr/local/xunsearch/) + bin/xs-ctl.sh-B. b. c. d start // the listener uses this option on the specified IP address to bind the listener to the IP address that can be accessed by the specified Internet. My website is 192.168.20.3.130.
You also need to use iptables to open ports 8383 and 8384. The simplest is to disable iptables.

PHP-SDK configuration file modification, as shown below

[Configuration file] project. name = demoproject. default_charset = utf-8server.index = 192.168.116.130: 8383 // address of the Index Server, 8383server by default. search = 192.168.116.130: 8384 // search the server address, the default value is 8384 [pid] type = id [subject] type = title // set the indexed field [message] type = body // set the indexed field [chrono] type = numeric [configuration file]

Specific use details please check the user manual: http://www.xunsearch.com/doc/php/guide/index.overview

Performance test:

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.