【发布时间】:2021-08-30 12:15:49
【问题描述】:
我需要将这 2 个查询合二为一,并按 Id 排序,
select GEODIST(40, 50, latitude,longitude, {in=degrees, out=meters}) AS distance, id FROM offersRT WHERE distance<=1000 LIMIT 0,30;
和
select 0 as distance, id FROM offersRT WHERE MATCH('@location_path_id 39644') LIMIT 0,30;
我使用 Manticore 3.6.0。
我不能像这样使用 OR 语句
WHERE distance<=1000 or MATCH('@location_path_id 39644')
我也这样尝试:
SELECT id FROM (
select 0 as distance, id FROM offersRT WHERE MATCH('@location_path_id 39644') LIMIT 0,30;
select GEODIST(40, 50, latitude,longitude, {in=degrees, out=meters}) AS distance, id FROM offersRT WHERE distance<=1000 LIMIT 0,30;
);
也没有工作。
还有其他选择吗?
【问题讨论】:
标签: full-text-search sphinx sphinxql manticore-search