Commit c762d405 authored by Emiliano Balbuena's avatar Emiliano Balbuena Committed by Mark Harding
Browse files

(fix): Missing .millis getter from Hot algorithm

parent 20890d28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ class Hot implements SortingAlgorithm
            def up = doc['votes:up:{$this->period}'].value ?: 0;
            def down = doc['votes:down:{$this->period}'].value ?: 0;

            def age = $time - (doc['@timestamp'].value / 1000) - 1546300800;
            def age = $time - (doc['@timestamp'].value.millis / 1000) - 1546300800;

            def votes = up - down;
            def sign = (votes > 0) ? 1 : (votes < 0 ? -1 : 0);