Sphinx INTERNAL ERROR:传入模式不匹配

时间:2014-06-05 07:18:30

标签: php sphinx

我想让这个索引起作用:

sql_query               = \

SELECT bo.es_id, bo.es_id as id, mem.es_country, es_uid, bo.es_featured 
as es_featured,
**bo.es_reverse_featured**, mem.es_signup_status as es_signup_status, mem.es_memtype as es_memtype, es_title, es_keywords, bo.tempdate, bo.es_postedon, bo.es_reverse_featured, bo.es_viewed, mem.es_reverse_memtype \
                FROM ephpb2b_offers_buy bo INNER JOIN ephpb2b_members mem ON bo.es_uid=mem.es_id \
        Where bo.es_featured IN (0,1)

sql_attr_uint = id
sql_attr_uint = es_signup_status
sql_attr_uint = es_memtype
sql_attr_uint = es_reverse_memtype
sql_attr_uint = es_country
sql_attr_uint = es_uid
sql_attr_timestamp = es_postedon
sql_attr_timestamp = tempdate
**sql_attr_uint = es_reverse_featured**
sql_attr_uint = es_viewed
sql_attr_uint = es_featured

它给了我错误:

    index tradeban_b2bdb_bo_relevent: INTERNAL ERROR: incoming-schema mismatch
(in=uint es_reverse_featured:32@288, my=uint es_reverse_featured:32@128)

我尝试使用Google搜索并提出了this SO question。但它是关于Ruby和思考 - 狮身人面像,我正在使用PHP。这个错误意味着什么,我该如何解决?

2 个答案:

答案 0 :(得分:1)

根据我的理解,从少数回答,其他一些问题和the sourcecode:你有

  • 为同一列创建了多个索引
  • 或者,对我来说似乎更有可能的是,你还有一个名为es_reverse_featured的索引。由于您尝试在查询中选择同名列,因此会发生冲突。

请尝试使用以下查询,将您的列重命名为es_reverse_featured_2

SELECT bo.es_id, bo.es_id as id, mem.es_country, es_uid,
 bo.es_featured AS es_featured,
 bo.es_reverse_featured AS es_reverse_featured_2,
 mem.es_signup_status AS es_signup_status, mem.es_memtype as es_memtype, es_title,
 es_keywords, bo.tempdate, bo.es_postedon, bo.es_reverse_featured, bo.es_viewed,
 mem.es_reverse_memtype
FROM ephpb2b_offers_buy bo
INNER JOIN ephpb2b_members mem ON bo.es_uid=mem.es_id
Where bo.es_featured IN (0,1)

答案 1 :(得分:1)

感谢您的帮助。

我发现我在select语句中选择es_reverse_featured两次:

Select es_reverse_featured, other_field1, other_field2, es_reverse_featured from table1

我删除了其他条目,问题已解决。

相关问题