Metarank Docs
  • Introduction
    • What is Metarank?
    • Quickstart
    • Performance
  • Guides
    • Search
      • Reranking with cross-encoders
  • Reference
    • Installation
    • Event Format
      • Timestamp formats
    • API
    • Command-line options
    • Configuration
      • Feature extractors
        • Counters
        • Date and Time
        • Generic
        • Relevancy
        • Scalars
        • Text
        • User Profile
        • Diversification
      • Recommendations
        • Trending items
        • Similar items
        • Semantic similarity
      • Models
      • Data Sources
      • Persistence
    • Deployment
      • Standalone
      • Docker
      • Kubernetes
      • Prometheus metrics export
      • Custom logging
      • Warmup
    • Integrations
      • Snowplow
  • How-to
    • Automated ML model retraining
    • Automatic feature engineering
    • Running in production
  • Development
    • Changelog
    • Building from source
  • Doc versions
    • 0.7.9 (stable)
    • master (unstable)
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Reference
  2. Event Format

Timestamp formats

PreviousEvent FormatNextAPI

Last updated 2 years ago

Was this helpful?

All input Metarank events have a timestamp field, an example:

{
  "type": "item",
  "id": "product1",
  "timestamp": "1599391467000",
  "fields": [
    {"name": "title", "value": "Nice jeans"}
  ]
}

The underlying JSON format has , so Metarank supports multiple ways of parsing timestamps:

  • as string literal: number of millis from 1970-01-01 00:00:00 in UTC as a string, like "1599391467000"

  • as formatted zoned datetime string, in UTC: "2022-06-22T11:21:39Z"

  • (not recommended) as JSON number, like 1599391467000

a numerical precision issue with timestamps encoded as double numbers
ISO 8601