Using the coreseek3.2 version, there is now a MySQL source, including fields such as Id,addtime,uid,title. Where Addtime is the Unix timestamp, now want to do scope query according to Addtime. The code is as follows:
$s = new SphinxClient;$s->setServer("localhost", 9312);$s->setArrayResult(true);$s->setMatchMode(SPH_MATCH_EXTENDED2);$s->SetFilterRange('addtime',0,99999999999);$result = $s->query('word', 'request_log_order');print_r($result);
But there is no egg, $result
for false
, when removed addtime filter can be filtered to the results, the value of Addtime is indeed located between 0-9999999999.
Question two: How to not set the keyword, that is, I only need to limit the scope of addtime, do not need to set search keywords. The query method must pass a keyword?
The scenario is this, you need to filter out the number of orders in the specified date more than n pen data, because the SQL statement complex, slow execution, so consider using Coreseek implementation.
Reply content:
Using the coreseek3.2 version, there is now a MySQL source, including fields such as Id,addtime,uid,title. Where Addtime is the Unix timestamp, now want to do scope query according to Addtime. The code is as follows:
$s = new SphinxClient;$s->setServer("localhost", 9312);$s->setArrayResult(true);$s->setMatchMode(SPH_MATCH_EXTENDED2);$s->SetFilterRange('addtime',0,99999999999);$result = $s->query('word', 'request_log_order');print_r($result);
But there is no egg, $result
for false
, when removed addtime filter can be filtered to the results, the value of Addtime is indeed located between 0-9999999999.
Question two: How to not set the keyword, that is, I only need to limit the scope of addtime, do not need to set search keywords. The query method must pass a keyword?
The scenario is this, you need to filter out the number of orders in the specified date more than n pen data, because the SQL statement complex, slow execution, so consider using Coreseek implementation.
Is it a 64-bit? So many 9 more than 32 bits in range.
1, the number of orders in the specified date more than n pen data
The database can be processed, add an index, it should be OK
2, the query method must pass a key word