读书人

sphinx coreseek SetSortMode(SPH_SOR

发布时间: 2013-09-28 10:01:20 作者: rapoo

sphinx coreseek SetSortMode(SPH_SORT_ATTR_ASC, '') 对float 排序设置bug

when I use SetSortMode(SPH_SORT_ATTR_ASC, 'floatVar'), it works unexpectedly. for example, I have a float Var ranging from [-10.0, 10.0] when I SetSortMode(SPH_SORT_ATTR_ASC, 'floatVar', the result is

0001.52.58-1.5-2.5-8...

why? where I go wrong ?

I just use another solution to solve it ,using

         case 'sentiment':             $sphinxapi->SetSortMode(SPH_SORT_EXPR, 'sentiment');         break;         case 'sentiment.desc':             $sphinxapi->SetSortMode(SPH_SORT_EXPR, '-sentiment');         break;

but I still confused why the SPH_SORT_ATTR_ASC didn't work ..

读书人网 >编程

热点推荐