Sphinx中文分词在discuz 中的应用(2)
sql_query_range = SELECT (SELECT MIN(tid) FROM pre_forum_thread),maxid FROM pre_common_sphinxcounter WHERE indexid=1
sql_range_step = 5000
sql_attr_uint = tid
sql_attr_uint = digest
sql_attr_uint = displayorder
sql_attr_uint = authorid
sql_attr_uint = special
sql_attr_timestamp =lastpost
sql_query_info = SELECT * FROM pre_forum_thread WHERE tid=$id
}
#threads
index pre_forum_thread
{
source = pre_forum_thread
path = /data0/dzbbs/indexdata/pre_forum_thread #windows下最好用全路径
docinfo = extern
mlock = 0
morphology = none
#charset_dictpath = /usr/local/mmseg32/etc/ #BSD、Linux环境下设置,/符号结尾
#charset_dictpath= etc/ #Windows环境下设置,/符号结尾
#charset_debug = 0
#### 索引的词最小长度
min_word_len = 2
#charset_type = zh_cn.utf-8
html_strip = 1
##### 字符表,注意:如使用这种方式,则sphinx会对中文进行单字切分,
##### 即进行字索引,若要使用中文分词,必须使用其他分词插件如 coreseek,sfc
charset_type = utf-8
chinese_dictionary = /usr/local/sfc22/etc/xdict
min_prefix_len = 0
min_infix_len = 1
ngram_len = 0
}
#threads_minute
source pre_forum_thread_minute : pre_forum_thread
{
#sql_query_pre =
sql_query_pre = SET NAMES UTF8
sql_query_pre = SET SESSION query_cache_type=OFF
sql_query_range = SELECT maxid-1,(SELECT MAX(tid) FROM pre_forum_thread) FROM pre_common_sphinxcounter WHERE indexid=1
}
#threads_minute
index pre_forum_thread_minute : pre_forum_thread
{
source = pre_forum_thread_minute
path = /data0/dzbbs/indexdata/pre_forum_thread_minute #windows下最好用全路径
}
#posts
source pre_forum_post : pre_forum_thread
{
- 发表评论
-
- 最新评论 更多>>