mirror of https://github.com/apache/lucene.git
use seconds instead of millisecs
It's a minor mistake and it doesn't affect the output due to the scale change (It will just make PAST_HOUR, PAST_SIX_HOURS not as intended). Still it's better to be correct.
This commit is contained in:
parent
e2deca0c2b
commit
2e4fc14e62
|
@ -46,7 +46,7 @@ public class RangeFacetsExample implements Closeable {
|
|||
|
||||
private final Directory indexDir = new ByteBuffersDirectory();
|
||||
private IndexSearcher searcher;
|
||||
private final long nowSec = System.currentTimeMillis();
|
||||
private final long nowSec = System.currentTimeMillis()/1000L;
|
||||
|
||||
final LongRange PAST_HOUR = new LongRange("Past hour", nowSec-3600, true, nowSec, true);
|
||||
final LongRange PAST_SIX_HOURS = new LongRange("Past six hours", nowSec-6*3600, true, nowSec, true);
|
||||
|
|
Loading…
Reference in New Issue