Sphinx search sql_attr_multi - where condition

梦想的初衷 提交于 2019-12-12 05:52:53

问题


I need to set an index.

sql_attr_multi = uint categories from query; SELECT item_id, category_id FROM connections WHERE value=2

It works fine If I set the value static.

That value is a variable so I want to assign it through a filter but it doesn`t work because I want to filter "sql_attr_multi" not the $sql.

$cl->setFilter("value", array(2));

Thanks


回答1:


setFilter has to do only with searching ( searchd process ). It's a filter applied to an attribute. The categories sql_attr_multi attribute values can't be changed depending on a condition ( unless you reindex or use updateAttributes). If values doesn't vary much , create for each one a mva attribute.



来源:https://stackoverflow.com/questions/13271656/sphinx-search-sql-attr-multi-where-condition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!