首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

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

2013-09-28 
sphinx coreseek SetSortMode(SPH_SORT_ATTR_ASC, ) 对float 排序设置bugwhen I use SetSortMode(SPH_SORT

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 ..

热点排行