php - Weird behaviour matching exact phrases with sphinx -


i using sphinx search engine. need search exact words in field. works fine, there weird anomalies.

$this->sphinxclient->query('@title "alfa romeo 159"~3', "indexads" ); 

i try this. if correctly understand searches field title , margin between words cannot bigger 2. user extended syntax of sphinx.

$this->sphinxclient->setarrayresult(true); $this->sphinxclient->setmatchmode(sph_match_extended2); $this->sphinxclient->setsortmode (sph_sort_relevance); if($category_id>0)     $this->sphinxclient->setfilter('category', array($category_id)); $this->sphinxclient->setfilter('status', array(1)); $this->sphinxclient->setlimits(0,50000); $this->sphinxclient->setfieldweights(array ("title"=>1000,"description"=>0)); 

this code use setup search. let me says filter absolutely not affect results want. use extended syntax, because sph_match_phrase doesnt not work way described @ all. extended syntax in doesnt work bad. search doesnt return results should match query. has else ever withnessed anomalies search engine or doing wrong. weird because have 2 fields same returns one.

alfa romeo, 159 sportwagon, 1.9 jtdm distinctive

alfa romeo, 159, sw progression 1.9jtdm

this our 2 values of field title, think both should match query yet first 1 does.

also when search audi a8 strings audi a6, audi a4 returned.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -