Skip to content

Hot feed not working

Steps to replicate

API Error

{"status":"error","message":"{\"error\":{\"root_cause\":[{\"type\":\"script_exception\",\"reason\":\"runtime error\",\"script_stack\":[\"age = 1575618281 - (doc['@timestamp'].value \/ 1000) - 1546300800;\\n\\n            def \",\"                                     ^---- HERE\"],\"script\":\"\\n            def up = doc['votes:up:12h'].value ?: 0;\\n            def down = doc['votes:down:12h'].value ?: 0;\\n\\n            def age = 1575618281 - (doc['@timestamp'].value \/ 1000) - 1546300800;\\n\\n            def votes = up - down;\\n            def sign = (votes > 0) ? 1 : (votes < 0 ? -1 : 0);\\n            def order = Math.log(Math.max(Math.abs(votes), 1));\\n\\n            return (sign * order) - (age \/ 43200);\\n        \",\"lang\":\"painless\"}],\"type\":\"search_phase_execution_exception\",\"reason\":\"all shards failed\",\"phase\":\"query\",\"grouped\":true,\"failed_shards\":[{\"shard\":0,\"index\":\"minds_badger\",\"node\":\"j_L53DseRqSq1no6YVc7QQ\",\"reason\":{\"type\":\"script_exception\",\"reason\":\"runtime error\",\"script_stack\":[\"age = 1575618281 - (doc['@timestamp'].value \/ 1000) - 1546300800;\\n\\n            def \",\"                                     ^---- HERE\"],\"script\":\"\\n            def up = doc['votes:up:12h'].value ?: 0;\\n            def down = doc['votes:down:12h'].value ?: 0;\\n\\n            def age = 1575618281 - (doc['@timestamp'].value \/ 1000) - 1546300800;\\n\\n            def votes = up - down;\\n            def sign = (votes > 0) ? 1 : (votes < 0 ? -1 : 0);\\n            def order = Math.log(Math.max(Math.abs(votes), 1));\\n\\n            return (sign * order) - (age \/ 43200);\\n        \",\"lang\":\"painless\",\"caused_by\":{\"type\":\"class_cast_exception\",\"reason\":\"Cannot apply [\/] operation to types [org.elasticsearch.script.JodaCompatibleZonedDateTime] and [java.lang.Integer].\"}}}]},\"status\":500}"}