Commit 6439615d authored by Paul Asmuth's avatar Paul Asmuth
Browse files

allow negative time queries

parent a4332a8b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ attribute types:
#   filter(KEY)
#   since(TIMESTAMP)
#   since(now)
#   since(-3600)
#   until(TIMESTAMP)
#   until(now)
#   stream()
@@ -34,6 +35,11 @@ attribute types:



# examples:
./bin/fnordquery -r localhost:1234 --query "filter(_channel = 'dawanda-tap') filter(q_params.page > 150) since(0) stream()" 




categorical_top_k (top keywords)
categorical_correlation (keyword correlation)
+1 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ private
  def parse_time(str)
    return :now     if str == "now"
    return str.to_i if str =~ /^[0-9]+$/
    return (Time.now.to_i - str[1..-1].to_i) if str =~ /^-[0-9]+$/
    raise InvalidQueryError.new("invalid time: #{str}")
  end