简体   繁体   中英

sphinxSE Setselect

Using SphinxApi , We have using following query for sphinxApi Setselect:

$cl->SetSelect ( "*, IF( IN(watching, 1) OR ordered=1, 1, 0) AS customFilter" );

Using SphinxQL:

select IF( IN(watching, 1) OR ordered=1, 1, 0) AS customFilter from indexname

Is that same thing how to using in SphinxSE ? Any one can help me out?

SELECT * FROM indexname WHERE query = ';select=*, IF( IN(watching, 1) OR ordered=1, 1, 0) AS customFilter';

当然,如果要查看结果中的值,则必须将customFilter定义为sphinx虚拟表上的一列

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM