Sphinx search: Use OR option with attributes and text -


i need results multiples queries sphinx. there's no problem when there attribute conditions.

for example:

$this->cl->setselect ( "*, item_fkprogram=700 or item_fkuser=350 mycond" ); $this->cl->setfilter ( "mycond", array(1) ); $results=$this->cl->query("","item"); 

it works fine, need add text queries. example: items that:

have item_fkprogram=700 or have item_fkuser=350 or have search string "text1" 

can done? in advance

if can reduce pairs numerical value, can use mva.

i explain

1° choose value each "param" - item_fkprogram <- 00 - item_fkuser <- 01 - item_fkfoo <- 02

2 concat

so index this

select id, concat (item_fkprogram,'00,',item_fkuser,'01,',item_fkfoo,'02') orattr table

and add

sql_attr_multi = uint orattr field;

there can search filter=sql_attr_multi,70000,35001

another way transform values in "words" , use extended search

select id, concat ('item_fkprogram',item_fkprogram,' ', 'item_fkuser',item_fkuser,' ', 'item_fkfoo',item_fkfoo) xx table

search @xx "item_fkprogram700" "item_fkuser350"


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -