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

  • 相关阅读:
    COGS 2075. [ZLXOI2015][异次元圣战III]ZLX的陨落
    51nod 1099 任务执行顺序
    洛谷 P1215 [USACO1.4]母亲的牛奶 Mother's Milk
    洛谷 P3395 路障
    2017.10.25 模拟赛
    COGS 146. [USACO Jan08] 贝茜的晨练计划
    洛谷 P3905 道路重建
    COGS 678. 双重回文数
    洛谷 P1509 找啊找啊找GF
    51nod 1366 贫富差距
  • 原文地址:https://www.cnblogs.com/sztsian/p/2204103.html
Copyright © 2011-2022 走看看