#源定义 source src1 { type = mysql
sql_host = localhost sql_user = root sql_pass = ****** sql_db = test sql_port = 3306 sql_query_pre = SET NAMES utf8
sql_query = SELECT tid,fid,iconid,typeid,sortid,readperm,price,author,authorid,subject,dateline,lastpost,lastposter,views,replies FROM cdb_threads #SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content FROM documents #sql_query第一列id需为整数 #title、content作为字符串/文本字段,被全文索引 sql_attr_uint = fid #从SQL读取到的值必须为整数 sql_attr_timestamp = dateline #从SQL读取到的值必须为整数,作为时间属性
sql_query_info = SELECT * FROM cdb_threads WHERE tid=$tid #命令行查询时,从数据库读取原始数据信息 }
#index定义 index test { source = src1 #对应的source名称 path = E:/www/coreseek/var/data/test docinfo = extern mlock = 0 morphology = none min_word_len = 1 html_strip = 0 #charset_dictpath = /usr/local/mmseg3/etc/ #BSD、Linux环境下设置,/符号结尾 charset_dictpath = etc/ #Windows环境下设置,/符号结尾 charset_type = zh_cn.utf-8 }
#全局index定义 indexer { mem_limit = 128M }
#searchd服务定义 searchd { listen = 9312 read_timeout = 5 max_children = 30 max_matches = 1000 seamless_rotate = 0 preopen_indexes = 0 unlink_old = 1 pid_file = E:/www/coreseek/var/log/searchd_mysql.pid log = E:/www/coreseek/var/log/searchd_mysql.log query_log = E:/www/coreseek/var/log/query_mysql.log }
以上是配置文件
执行创建索引命令,提示: using config file '../etc/csft.conf'... indexing index 'test'... Unigram dictionary load Error |