当前位置: 动力学知识库 > 问答 > 编程问答 >

warning attribute not found sphinx

问题描述:

I try make a search for a procedure result in sphinx , I have this source:

 source src_tax_autocomplete_developer : base

{

sql_query = CALL taxonomy_autocomplete('developer');

sql_attr_uint = uid;

sql_attr_uint = tid;

sql_field_string = name;

}

and this index :

index idx_tax_autocomplete_developer

{

# Which source to use

source = src_tax_autocomplete_designer

# Path where to store the index data

path = /usr/local/sphinx/var/data/tax_autocomplete_developer

docinfo = extern

# Charset of the data

charset_type = utf-8

enable_star = 1

min_prefix_len = 3

# Minimum lenght of a word to be indexed.

min_word_len = 3

charset_table = U+FF10..U+FF19->0..9, U+FF21..U+FF3A->a..z, U+FF41..U+FF5A->a..z, 0..9, A..Z->a..z, a..z, ., +

}

my procedure is :

delimiter $$

create procedure taxonomy_autocomplete(role varchar(20))

begin

set @n=0;

set @role=role;

set @users=concat(concat(concat(concat('select @n := @n+1 as id,uid,0 as tid,`name` from users

left join field_data_field_user_','',@role),'',' on entity_id = uid

where field_user_'),'',@role),'','_tid is null ;');

set @taxonomy=concat('SELECT @n := @n + 1 as id,0 as uid ,tid,`name` FROM taxonomy_term_data where vid=(select vid from taxonomy_vocabulary where `name`=?)

union all ','', @users);

set @roles=concat(@role,'','s');

prepare stmt from @taxonomy;

execute stmt using @roles;

DEALLOCATE PREPARE stmt;

end $$

when run sphinx I take this warring :

WARNING: attribute 'uid;' not found - IGNORING

WARNING: attribute 'tid;' not found - IGNORING

WARNING: attribute 'name;' not found - IGNORING

WARNING: Attribute count is 0: switching to none docinfo

and I can't search for name , what should I do , I try search but can't found noting to help me

分享给朋友:
您可能感兴趣的文章:
随机阅读: