coreseek配置文件分析

简介: E:\wamp\coreseek\etc>indexer company_info -c csft_mysql.conf Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)] Copyright (c) 2007-2011, Beijing Choice Software Technologies Inc (http://www.
E:\wamp\coreseek\etc>indexer company_info -c csft_mysql.conf
Coreseek Fulltext 3.2 [ Sphinx 0.9.9-release (r2117)]
Copyright (c) 2007-2011,
Beijing Choice Software Technologies Inc (http://www.coreseek.com)

 using config file 'csft_mysql.conf'...
indexing index 'company_info'...
WARNING: attribute 'firstcate' not found - IGNORING    ①
WARNING: attribute 'secondcate' not found - IGNORING    ②    
WARNING: attribute 'regprovince' not found - IGNORING   ③
WARNING: attribute 'regcity' not found - IGNORING      ④
........
total 2 reads, 0.000 sec, 1.5 kb/call avg, 0.0 msec/call avg
total 7 writes, 0.000 sec, 1.2 kb/call avg, 0.0 msec/call avg-------------------------------------------------------------------

 using config file 'csft_mysql.conf'...
indexing index 'company_info'...
WARNING: attribute 'secondcate' not found - IGNORING  ①
WARNING: attribute 'regprovince' not found - IGNORING  ②
WARNING: attribute 'regcity' not found - IGNORING    ③
......

配置文件中有这两项配置

sql_query               = SELECT cid, companyname, regtime, firstcate FROM companyinfo
                                                            #sql_query第一列id需为整数,且被系统使用,无需再设置sql_attr_uint
                                                            
    #以下用sql_attr_开头的属性 设置的列是用来提示这几个列可以被函数SphinxClient::SetFilter()用来过滤     
    #相反地,sql_query中没有被设置的列就默认用作创建全文索引来使用了                                                                                                          
    sql_attr_uint           = firstcate               #从SQL读取到的值必须为整数
    sql_attr_uint            = secondcate
    sql_attr_uint            = regprovince
    sql_attr_uint            = regcity
    sql_attr_timestamp      = regtime                 #从SQL读取到的值必须为整数,作为时间属性

sql_query 项如果在右边写了‘fristcate’就会出现第一个图中的三个警告(未找到某某属性),如果没写就会出现四个警告,正好多了“未找到firstcate属性”。
因此意思是,sql_query属性查出一堆字段,下边的sql_attr_*对查出的这堆字段确定其数值类型,如果确定的字段没有在sql_query查出的这堆的字段中就会出现警告

ps:用脚本而非命令行进行查询时,若配置文件有改变,记得要重新启动服务

目录
相关文章
|
3月前
|
缓存 应用服务中间件 开发工具
Ngnix配置文件nginx.conf的文件结构
Ngnix配置文件nginx.conf的文件结构
|
消息中间件 PHP
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
112 0
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
修改dedecms 一些配置cfg_softname,cfg_soft_enname,cfg_soft_devteam
修改dedecms 一些配置cfg_softname,cfg_soft_enname,cfg_soft_devteam
97 0
修改dedecms 一些配置cfg_softname,cfg_soft_enname,cfg_soft_devteam
|
索引
sphinx(六)sphinx 配置文件sphinx.conf配置项全解析
source:数据源,数据是从什么地方来的。 index:索引,当有数据源之后,从数据源处构建索引。索引实际上就是相当于一个字典检索。有了整本字典内容以后,才会有字典检索。 searchd:提供搜索查询服务。它一般是以deamon的形式运行在后台的。 indexer:构建索引的服务。当要重新构建索引的时候,就是调用indexer这个命令。
301 0
sphinx(六)sphinx 配置文件sphinx.conf配置项全解析
|
Web App开发 监控 应用服务中间件