免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2035 | 回复: 0
打印 上一主题 下一主题

[服务应用] sphinx创建索引报错:ERROR: index 'wp_main': column number 6 has no name. [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-07-20 16:00 |只看该作者 |倒序浏览
错误信息:
indexing index 'wp_main'...
ERROR: index 'wp_main': column number 6 has no name.
total 0 docs, 0 bytes
total 0.001 sec, 0 bytes/sec, 0.00 docs/sec

我的配置如下:
sql_port                = 3306
    sql_sock                = /tmp/mysql.sock

    sql_query_pre           = SET NAMES UTF8
    sql_query_pre           = CREATE TABLE IF NOT EXISTS cms_sph_counter ( counter_id INTEGER PRIMARY KEY NOT NULL,max_doc_id INTEGER NOT NULL)
    sql_query_pre           = REPLACE INTO cms_sph_counter SELECT 1, MAX(id) FROM app
    sql_query               = SELECT id, id as pid, title, UNIX_TIMESTAMP(updated) AS updated, UNIX_TIMESTAMP(releaseDate) AS releaseDate,shortDescription, \
                               CRC32(language) AS language, langsort, price*100 as price, history_price*100 as history_price, comment_count, down_count, is_free, \
                               dig_up_count, averageAppRating*10 as averageAppRating , is_off, UNIX_TIMESTAMP(change_price_time) AS change_price_time , is_zh_cn, is_en_us, is_zh_hk,keywords \
                             FROM app \
                             WHERE id>=$start and id<=$end
                            #sql_query第一列id需为整数
                            #title、content作为字符串/文本字段,被全文索引
    sql_query_range         = SELECT (SELECT MIN(id) FROM app),max_doc_id FROM cms_sph_counter WHERE counter_id=1
    sql_range_step          = 4096
    sql_attr_uint           = pid   #从SQL读取到的值必须为整数
    sql_attr_uint           = language
    sql_attr_uint           = price
    sql_attr_uint           = history_price
    sql_attr_uint           = langsort
    sql_attr_uint           = comment_count
    sql_attr_uint           = down_count
    sql_attr_uint           = dig_up_count
    sql_attr_uint           = averageAppRating
    sql_attr_uint           = is_free
    sql_attr_uint           = is_off
    sql_attr_uint           = is_zh_cn
    sql_attr_uint           = is_en_us
    sql_attr_uint           = is_zh_hk
    sql_attr_multi          = uint tag_id from ranged-query; \
                            SELECT app_id, tag_id FROM cms_tag_relations WHERE app_id>=$start and app_id<=$end; \
                            SELECT (SELECT MIN(id) FROM app),max_doc_id FROM cms_sph_counter WHERE counter_id=1
    sql_attr_multi          = uint license_id from ranged-query; \
                SELECT app_id, license_id FROM app_offers WHERE app_id>=$start AND app_id<=$end; \
                SELECT (SELECT MIN(id) FROM app), max_doc_id FROM cms_sph_counter WHERE counter_id=1
    sql_attr_timestamp      = updated #从SQL读取到的值必须为整数,作为时间属性
    sql_attr_timestamp      = releaseDate
    sql_attr_timestamp      = change_price_time
    sql_query_info_pre      = SET NAMES utf8                       #命令行查询时,设置正确的字符集
    sql_query_info          = SELECT * FROM app WHERE id=$id #命令行查询时,从数据库读取原始数据信息
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP