Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8963

And new TimeStream to support fine grain time series operations

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • 6.2, 7.0
    • None
    • None

    Description

      The TimeStream will read Tuples from an underlying stream and expand a unix timestamp into the individual fields: year, month, day, hour, week, minute, second, milli-second).

      This will allow rollups to made on any time grain. This should be very useful for time series log analysis.

      Sample syntax:

      rollup(
                  time(search(...,sort="timestamp asc", fl="timestamp,..."), field="timestamp")
                  over="year, month,day,hour,minute,second,millis",
                  sum(a_i),
                  sum(a_f),
                  min(a_i),
                  min(a_f),
                  max(a_i),
                 max(a_f),
                 avg(a_i),
                 avg(a_f),
                 count(*))
      

      Example broken down by customer:

      rollup(
                  time(search(...,sort="customer asc, timestamp asc", fl="timestamp,..."), field="timestamp")
                  over="customer, year, month,day,hour,minute,second,millis",
                  sum(a_i),
                  sum(a_f),
                  min(a_i),
                  min(a_f),
                  max(a_i),
                 max(a_f),
                 avg(a_i),
                 avg(a_f),
                 count(*))
      

      To do parallel time series rollups just wrap in a parallel stream and add the partitionKeys to the search.

      paralllel(..., (rollup(
                  time(search(...,sort="customer asc, timestamp asc", fl="timestamp,...", partitionKeys="customer"), field="timestamp")
                  over="customer, year, month,day,hour,minute,second,millis",
                  sum(a_i),
                  sum(a_f),
                  min(a_i),
                  min(a_f),
                  max(a_i),
                 max(a_f),
                 avg(a_i),
                 avg(a_f),
                 count(*)))
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbernste Joel Bernstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: