Coreseek®  
 | 首页 | 注册 | 回复 | 搜索 | 统计资料 |                 网站首页产品服务开放源码安装使用常见问题中文手册社区交流联系我们 
中文分词 论坛首页 / 中文分词 /

试着发一个问题

 
kvtest
会员
#1 | 发表时间: 2010 06 03 10:06 | 修改: kvtest
回复 
昨天我安装了mmseg和coreseek后,用的数据库是postgres。查询英文,可以出结果,查询中文,查询不到结果。用indextool工具跟踪,报以下错误:
../bin/indextool --dumphitlist  main 山河
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-id64-release (r2117)]
Copyright (c) 2007-2010,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)

using config file '/app/coreseek/etc/csft.conf'...
dumping hitlist for index 'main' keyword '山河'...
FATAL: keyword=山河, no token (too short?)

不知道到什么原因造成的。
请大家帮忙看看!谢谢
kvtest
会员
#2 | 发表时间: 2010 06 03 10:13 | 修改: kvtest
回复 
以下是csft.conf文件的内容,帮忙看看!很急!
source main
{
type = pgsql
# strip_html = 0
# index_html_attrs =
sql_host = 172.16.3.120
sql_user = ups
sql_pass = ups
sql_db = postgres
sql_port= 5432 # optional, default is 3306
sql_query_pre = SET NAMES 'utf8'
sql_query_pre=  update skyups.sphinx_counter set max_doc_id =(select max(id) from skyups.tbl_ups_user_info) where counter_id=1


sql_query = SELECT skyid,username,sex,birthday,animals,star,blood,province,city,vocation,nickname,realname,married FROM skyups.tbl_ups_user_info where id <= (select max_doc_id from skyups.sphinx_counter where counter_id=1)
#sql_query = SELECT * FROM a.eht_articles


#sql_attr_uint= married
#sql_attr_uint= star
#sql_attr_uint = sex

#sql_attr_timestamp = createtime

sql_query_post  =
sql_ranged_throttle= 0
#sql_query_info = SELECT * FROM a.eht_articles WHERE ARTICLESID=$id
}

source delta : main
{
  sql_query_pre =
  sql_query = SELECT skyid,username,sex,birthday,animals,star,blood,province,city,vocation,nickname,realname,married FROM skyups.tbl_ups_user_info where id > (select max_doc_id from skyups.sphinx_counter where counter_id=1)
}


index main
{
source   = main
path   = /sky/sphinx/coreseek/var/data/main
docinfo   = extern
mlock   = 0
morphology   = none
stopwords   =
min_word_len  = 1


charset_type = zh_cn.utf-8
charset_dictpath = /sky/sphinx/coreseek/dict/

min_prefix_len = 0

min_infix_len = 1

ngram_len = 1

#ngram_chars = U+4E00..U+9FBF, U+3400..U+4DBF, U+20000..U+2A6DF, U+F900..U+FAFF,\
#U+2F800..U+2FA1F, U+2E80..U+2EFF, U+2F00..U+2FDF, U+3100..U+312F, U+31A0..U+31BF,\
#U+3040..U+309F, U+30A0..U+30FF, U+31F0..U+31FF, U+AC00..U+D7AF, U+1100..U+11FF,\
#U+3130..U+318F, U+A000..U+A48F, U+A490..U+A4CF
}

index delta : main
{
  source   = delta
  path   = /sky/sphinx/coreseek/var/data/delta
}


indexer
{
mem_limit   = 128M
}


searchd
{
# address    = 0.0.0.0
port    = 9312
log     = /sky/sphinx/coreseek/var/log/searchd.log
query_log   = /sky/sphinx/coreseek/var/log/query.log
read_timeout  = 5
max_children  = 30
pid_file   = /sky/sphinx/coreseek/var/log/searchd.pid
max_matches   = 1000
seamless_rotate  = 1
}
HonestQiao
会员
#3 | 发表时间: 2010 06 03 13:44
回复 
1. 用pgsql的client,然后使用给coreseek的sql,依次查询,可以得到正确的输出么?
2. bin/indexer的结果是什么?
3. bin/search检索的具体结果是什么?
kuohu
会员
#4 | 发表时间: 2010 06 03 14:34
回复 
(too short?) 看这个是编码的问题, 因为 山河 明显是2个字,而且 min_word_len =  1 , 最后结论, 应该是编码问题。
kvtest
会员
#5 | 发表时间: 2010 06 04 15:19
回复 
编码我都试过了,还是不行啊!
HonestQiao
会员
#6 | 发表时间: 2010 06 06 20:02
回复 
1. 用pgsql的client,然后使用给coreseek的sql,依次查询,可以得到正确的输出么?
2. bin/indexer的结果是什么?
3. bin/search检索的具体结果是什么?
kvtest
会员
#7 | 发表时间: 2010 06 07 16:46 | 修改: kvtest
回复 
1.我用pgsql客户端连接,查询coreseek的sql,可以显示中文的。
2.用bin/indexer命令后显示
bin/indexer --all --rotate
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-id64-release (r2117)]
Copyright (c) 2007-2010,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)
using config file '/app/coreseek/etc/csft.conf'...
indexing index 'main'...
collected 6 docs, 0.0 MB
sorted 0.0 Mhits, 98.4% done
total 6 docs, 261 bytes
total 0.015 sec, 16362 bytes/sec, 376.15 docs/sec
rotating indices: succesfully sent SIGHUP to searchd (pid=4060).
3.用bin/search检索,结果如下:
bin/search sky
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-id64-release (r2117)]
Copyright (c) 2007-2010,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)
using config file '/app/coreseek/etc/csft.conf'...
index 'main': query 'sky ': returned 2 matches of 2 total in 0.003 sec
displaying matches:
1. document=100007, weight=2
2. document=100001, weight=1
words:
1. 'sky': 2 documents, 3 hits

bin/search 山河
Copyright (c) 2007-2010,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)
using config file '/app/coreseek/etc/csft.conf'...
index 'main': query '山河 ': returned 0 matches of 0 total in 0.003 sec
words:


检索中文没有结果的,很奇怪,帮我分析一下!
HonestQiao
会员
#8 | 发表时间: 2010 06 07 17:45
回复 
words部分没有结果?

那你压根没有启用中文分词,请先查看:
www.coreseek.cn/news/6/52/
 
回复
Bold Style  Italic Style  Image 链接  URL 链接 
发帖注意:
  • 网址中请去掉http://开头,例如:您需要输入www.coreseek.cn,而不是http://www.coreseek.cn
  • 咨询问题,请贴出详细的操作系统版本、Coreseek版本(Linux环境请给出编译参数)
  • 请仔细查看中文手册和本站安装指南,确认操作正确
  • 请仔细查看常见问题解答,也许你的问题已经有解决方法

» 帐号  » 密码 
发帖前请登陆, 或者 注册 .