Hierarchical time indexing

Timehash key generator

Unofficial demo for the open-source Timehash project. Timehash is copyright NAVER Corp. and licensed under Apache-2.0.

Enter a document time range and a query time to generate the index keys stored on a document and the query keys used at search time.

Document range

Index key generator

Index keys

Search time

Query key generator

Query keys
Minute index 560
Timehash index 5
Reduction 99.1%
Match Yes

          

Examples

Common search patterns

Restaurants open now

Store each restaurant's hours as Timehash keys, then query with the current local time.

Booking availability

Represent bookable windows compactly while keeping exact time matching semantics.

Shift operations

Filter schedules, teams, or resources without expanding every covered minute.

Learn

How Timehash works

08113040 081145 12 16 2020
Index term generation

Timehash recursively chooses the largest bucket that fits inside the range. Boundaries are refined with smaller buckets.

Query term generation

A query time creates one key per hierarchy level, from coarse buckets to exact minute-level buckets.

Exact matching

A document matches when any query key appears in the document's index keys, giving zero false positives and zero false negatives.

Source

Use the same model across language implementations

Package registry distribution is not assumed here. Use the source implementations in the repository until packages are published.

javascript/timehash.js
python/timehash.py
go/timehash.go
rust/src/lib.rs