配置文件如下
sql_query = select id, id as restaurant_id, restaurant_name as name, phone, price, \
city_id, address, IF(`longitude`,`longitude`,0.0) as longitude, IF(`latitude`, `latitude`, 0.0) as latitude \
from `...` \
...
...
sql_attr_float = longitude
sql_attr_float = latitude
执行结果如下:
mysql> SELECT *,GEODIST(31.22650528,121.49153900,latitude,longitude) as distance FROM `restaurant_index` WHERE distance < 10000 ORDER BY `id` ASC LIMIT 0, 10 \G
ERROR 1064 (42000): index restaurant_index: unsupported filter type 'intrange' on float column
版本:Coreseek Fulltext 4.1 [ Sphinx 2.0.2-dev (r2922)]
哪里不对呢? 或者说sphinx做位置搜索应该怎么做.
问题作废,貌似是版本的问题.
我用原生的sphinx 2.2.8测试了一把, 不报错.
顺便问下,coreseek是不是停止开发了? 那么现在的中文全文检索用什么?
尝试了一下这么做,把<1000修改为<=1000.0 能够正常查询了.