1create table ts (id bigint unsigned not null, w int not null, query varchar(255) not null, index(query)) engine=sphinx connection="sphinx://127.0.0.1:PORT/*"; 2SELECT a.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS b; 3id w query 41 1 ;mode=extended2;limit=1000000;maxmatches=500 52 1 ;mode=extended2;limit=1000000;maxmatches=500 63 1 ;mode=extended2;limit=1000000;maxmatches=500 74 1 ;mode=extended2;limit=1000000;maxmatches=500 85 1 ;mode=extended2;limit=1000000;maxmatches=500 9SELECT a.* FROM (SELECT * FROM ts si WHERE si.query='@* 123nothingtofind123;mode=extended2;limit=1000000;maxmatches=500') AS a UNION SELECT b.* FROM (SELECT * FROM ts si WHERE si.query=';mode=extended2;limit=1000000;maxmatches=500') AS b; 10id w query 111 1 ;mode=extended2;limit=1000000;maxmatches=500 122 1 ;mode=extended2;limit=1000000;maxmatches=500 133 1 ;mode=extended2;limit=1000000;maxmatches=500 144 1 ;mode=extended2;limit=1000000;maxmatches=500 155 1 ;mode=extended2;limit=1000000;maxmatches=500 16drop table ts; 17