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

  • 相关阅读:
    Impala源码之订阅发布系统的实现
    Kylin性能调优记——业务技术两手抓
    The Beam Model:Stream &amp; Tables翻译(上)
    手把手教你搭建hadoop+hive测试环境(新手向)
    使用 Apache Atlas 进行数据治理
    类似gitlab代码提交的热力图怎么做?
    3分钟掌握一个有数小技能:回头客分析
    3分钟掌握一个有数小技能:制作动态标题
    uva 10404 Bachet's Game(完全背包)
    POJ3771+Prim
  • 原文地址:https://www.cnblogs.com/sztsian/p/2204103.html
Copyright © 2011-2022 走看看