zoukankan      html  css  js  c++  java
  • PHPCMS配合讯搜xunsearch构建站内搜索以及相关调用

    1、下载解压讯讯搜

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

    2、查看和进入讯搜目录

    ls cd xunsearch-full-1.4.14/

    3、安装讯搜

    sh setup.sh

    可以指定安装目录比如/www/wwwroot/xunsearch

    4、其它设置

    启动命令:

    /www/wwwroot/xunsearch/bin/xs-ctl.sh restart

    /www/wwwroot/xunsearch/bin/xs-ctl.sh start

    加入开机启动:

    进入/etc/rc.local,添加启动命令即可。

    5、新建配置文件ini

    路径:/www/wwwroot/xunsearch/sdk/php/app

    代码如下:

    project.name = ceshiceshi
    project.default_charset = utf-8
    server.index = 8383
    server.search = 8384
    
    [id]
    type = id
    
    [title]
    type = title

    6、终端执行,开始索引数据。

    重建缓存
    /www/wwwroot/xunsearch/sdk/php/util/Indexer.php --rebuild --source=mysql://数据库帐号:数据库密码@localhost/数据库名称--sql="SELECT * FROM v9_news" --project=ceshiceshi
    
    
    清空缓存
    /www/wwwroot/xunsearch/sdk/php/util/Indexer.php --clean --project=ceshiceshi

  • 相关阅读:
    python之处理excel表格
    Django下JWT的使用
    Flask的上下文管理
    模块循环引用
    博客声明及意义
    IPTABLES--iptables
    挂载U盘
    tar压缩解压
    iconv字符编码转换
    VirtualBox设置共享文件夹
  • 原文地址:https://www.cnblogs.com/jackMRchen/p/14290510.html
Copyright © 2011-2022 走看看