The coreseek3.2 version used now has a mysql source, including fields such as id, addtime, uid, and title. Here, addtime is a unix timestamp, and now you want to perform a range query based on addtime. The Code is as follows: {code ...} however, there is no such use. $ result is false. When addti... is removed... the coreseek3.2 version used now has a mysql source, including fields such as id, addtime, uid, and title. Here, addtime is a unix timestamp, and now you want to perform a range query based on 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);
However, there is no such thing,$result
Isfalse
After the addtime filter is removed, the results can be properly filtered. The value of addtime is indeed between 0 and 9999999999.
Question 2: Do not set keywords, that is, I only need to limit the addtime range, and do not need to set search keywords. The query method must contain a keyword?
The application scenario is as follows. You need to filter data with more than N orders in a specified date. Due to the complexity of SQL statements and slow execution speed, coreseek is used.
Reply content:
The coreseek3.2 version used now has a mysql source, including fields such as id, addtime, uid, and title. Here, addtime is a unix timestamp, and now you want to perform a range query based on 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);
However, there is no such thing,$result
Isfalse
After the addtime filter is removed, the results can be properly filtered. The value of addtime is indeed between 0 and 9999999999.
Question 2: Do not set keywords, that is, I only need to limit the addtime range, and do not need to set search keywords. The query method must contain a keyword?
The application scenario is as follows. You need to filter data with more than N orders in a specified date. Due to the complexity of SQL statements and slow execution speed, coreseek is used.
Is it 64-bit? So many 9 exceeds the 32-bit range.
1. Data with more than N orders in a specified date
The database will be able to handle it. Add an index. It should be OK.
2. the query method must contain a keyword.