I'm using RT index and I'll be using rt_attr_uint to hold unix timestamp, is that ok?

Below is what I mean,

#rtindex
type = rt
path = /var/data/sphinx/idx
rt_attr_uint = timestamp

Then will use php time() function to insert the time to the field, something like the following

$mysqli->query("insert into idx values ( time() ) ");
有帮助吗?

解决方案

Yes, that should work.

$pdo->query('INSERT INTO idx VALUES(' . time() . ')');

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top