【发布时间】:2013-04-07 11:40:34
【问题描述】:
我,有桌子:
id | geo_id | values ....
1 1 wvrevev
2 2 wvrevev
3 3 wvrevev
3 4 wvrevev
7 5 wvrevev
8 6 wvrevev
9 8 wvrevev
在狮身人面像索引的两个字段中:id 和 geo_id
我需要某种类型,它会位于我指定记录的顶部。在 SQL 中收到这样的请求:
SELECT * FROM table ORDER BY FIELD(geo_id, "2", "3", "6") DESC
如何在 Sphinx 中指定排序? 此条目:
$cl->SetSortMode(SPH_SORT_EXTENDED, "FIELD(geo_id, "2", "3", "6") DESC");
抛出错误:
enter code hereindex sphinxoffers: sort-by attribute 'field' not found
如何摆脱困境?
【问题讨论】:
标签: php search full-text-search sphinx