php 全文搜索解决方法

全套解决方案 xunsearch


一、安装编译工具 yum install make gcc g++ gcc-c++ libtool autoconf automake imake mysql-devel libxml2-devel expat-devel 

centos安装有点错误,需要安装编译工具。来源: https://www.cnblogs.com/houdj/p/5358724.html

二、安装/检测运行环境/启动服务

http://www.xunsearch.com/doc/php/guide/start.installation

三、配置

xunsearch是单独api服务器,不链接mysql数据库,

先开启服务:

cd $prefix
bin/xs-ctl.sh restart

在进行:

1、先搜索配置,

2、灌数据以便索引。

配置运行、数据结构和索引方式

http://www.xunsearch.com/doc/php/guide/ini.guide

三、建立索引

灌数据以便让xunsearch建立索引

索引是异步的,不能立即得到搜索结果,开发时候需要注意这点。

http://www.xunsearch.com/doc/php/guide/index.overview

四、建立的索引可以搜索

搜索、高亮显示等

http://www.xunsearch.com/doc/php/guide/search.overview

原文地址:https://www.cnblogs.com/mitang/p/10251734.html