zoukankan      html  css  js  c++  java
  • 讯搜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

    /home/www/xunsearch

    启动命令:(根据自己的具体路径)

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

    4、加入开机启动:

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

    5、新建配置文件ini

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

    代码如下:

    project.name = discuz
    project.default_charset = GBK
    ;服务端用默认值
    ;server.index = 8383
    ;server.search = 8384
     
    [pid]
    type = id
     
    [fid]
    index = self
    tokenizer = full
     
    [tid]
     
    [first]
    index = self
    tokenizer = full
     
    [author]
    index = both
     
    [authorid]
     
    [subject]
    type = title
     
    [message]
    type = body
     
    [dateline]
    type = numeric

    pid 主键,必须的

    fid 按版块检索时需要用到

    tid 搜索结果阅读链接都是按 tid 来的,必备

    first 表示该贴子是否为楼主,过滤回贴时用到

    author, authorid 按作者检索用得到

    subject 标题

    message 贴子内容

    dateline 发表时间,要用到

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

    /www/wwwroot/xunsearch/sdk/php/util/Indexer.php --rebuild --source=mysql://zhanghao:mima@localhost/shujukumingzi --sql="SELECT * FROM news" --project=peizhiwenjian

  • 相关阅读:
    hdu5714 拍照[2016百度之星复赛C题]
    hdu5715 XOR 游戏 [2016百度之星复赛D题]
    AFO
    BZOJ 3566 概率充电器
    BZOJ 3427 Bytecomputer
    BZOJ 4513 储能表
    BZOJ 3667 Miller_Rabin
    BZOJ 4557 侦察守卫
    BZOJ 3894 文理分科
    SUOI #69 奔跑的Aqua
  • 原文地址:https://www.cnblogs.com/jackMRchen/p/14290492.html
Copyright © 2011-2022 走看看