codefreak
codefreak

Reputation: 7131

Sphinx INTERNAL ERROR: incoming-schema mismatch

I am trying to get this index to work:

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

It's giving me error:

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

I tried googling and came up with this SO question. But it's about Ruby and thinking-sphinx and and I am using php. What does this error mean and how can I resolve it?

Upvotes: 0

Views: 485

Answers (2)

codefreak
codefreak

Reputation: 7131

Thank you for your help SO fellows.

I found that I was selecting es_reverse_featured twice in my select statement:

Select es_reverse_featured, other_field1, other_field2, es_reverse_featured from table1.

I removed the other entry and issue was resolved.

Upvotes: 1

Ulrich Thomas Gabor
Ulrich Thomas Gabor

Reputation: 6654

From what I understand from the few responses, some other questions and the sourcecode: You have either

  • created multiple indexes for the same column
  • or, what seems likelier to me here, is that you also have an index called es_reverse_featured. Since you are trying to select a same-named column inside of your query, these clash.

Try the following query instead, which renames your column to 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)

Upvotes: 1

Related Questions