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