zoukankan      html  css  js  c++  java
  • Coreseek 增量索引

    花了一下午。终于把coreseek的配置搞定了。以下是我的配置文件/usr/local/coreseek/etc/csft.conf
    source main
    {
    type = mysql
    sql_host = localhost
    sql_user = root
    sql_pass = 密码
    sql_db =库名
    sql_port = 3306# optional, default is 3306
    sql_query = \
    SELECT ID, UNIX_TIMESTAMP(post_date) AS date_added, post_title, post_content \
    FROM wp_posts
    #sql_attr_uint = group_id
    sql_attr_timestamp = date_added
    sql_ranged_throttle = 0
    sql_query_info = SELECT * FROM wp_posts WHERE id=$id
    sql_query_pre = SET NAMES utf8
    sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM wp_posts
    #sql_query = SELECT id, title, body FROM documents \
    #WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
    }


    source delta : main
    {
        sql_query_pre = SET NAMES utf8
        sql_query = SELECT ID, UNIX_TIMESTAMP(post_date) AS date_added, post_title, post_content FROM wp_posts \
            WHERE id>( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )

    }

    index main
    {
    source = main
    path = /usr/local/coreseek/var/data/test1
    docinfo = extern
    mlock = 0
    morphology = none
    stopwords = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/stopwords.txt
    wordforms = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/wordforms.txt
    exceptions = /usr/local/coreseek/var/data/exceptions.txt  #/data/exceptions.txt
    min_word_len = 1
    charset_type = sbcs
    html_strip = 0
    }

    index delta : main
    {
    source = delta
    path = /usr/local/coreseek/var/data/test1/delta
    docinfo = extern
    mlock = 0
    morphology = none
    stopwords = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/stopwords.txt
    wordforms = /home/sztsian/coreseek-3.2.14/csft-3.2.14/test/wordforms.txt
    exceptions = /usr/local/coreseek/var/data/exceptions.txt  #/data/exceptions.txt
    min_word_len = 1
    charset_type = sbcs
    html_strip = 0
    }

    然后,./indexer  -c ../etc/csft.conf --all 重建整个索引。

    在cront中,设置./indexer  delta -c ../etc/csft.conf 做增量索引。设置./indexer  -c ../etc/csft.conf --all 做重建索引。
    其实手册里面写的很详细了。http://www.coreseek.cn/docs/coreseek_3.2-sphinx_0.9.9.html

  • 相关阅读:
    parted分区流程操作
    配置sudo命令行为审计
    sudo详细介绍
    groupadd(创建组)重要参数介绍
    useradd常用参数介绍
    /etc/default/useradd文件内容及对应功能
    linux基础正则
    centos 7.5 安装mongodb
    centos 7.5 安装mysql
    php删除制定文件及文件夹
  • 原文地址:https://www.cnblogs.com/sztsian/p/2204103.html
Copyright © 2011-2022 走看看