Friday, 15 April 2011

Sphinx search by attribute -



Sphinx search by attribute -

could search sphinx attributes without query word

config:

sql_query = select p.id price_id, p.info, p.sort_id, p.made_id, p.category_id, 'prices' table_id cost p sql_query_info = select * cost id = $id sql_attr_uint = sort_id

...

min_word_len = 0 min_infix_len = 0 min_prefix_len = 0 enable_star = 1 docinfo = extern

code:

$search->setfilter('sort_id',[1,2]); $search->query("*","prices");

get 0 results

$search->query("","prices");

if returns no results, you've got other logic error.

tangential, why 'enable_star' infix/prefix set 0? have no effect.

sphinx

No comments:

Post a Comment