◷ openchronology

Entity tags and separation

Events (moments and durations) can carry tags: short labels you choose, such as war or trade. Enter them as a comma-separated list in the Tags field of a moment's details or the duration dialog. Tags are stored as metadata.tags and normalized like timeline tags: trimmed, lowercased, deduplicated, at most 40 per entity, 1–64 characters each, without commas or control characters. Search indexes them with the rest of the timeline, and they travel through .ochx, .och, server saves, forks and merges like other metadata. tags is reserved, so plugin fields cannot use it. Older documents that used a tags key for something other than a list of tag strings open unchanged, and that value is ignored for tagging.

Separating by tags

Separate by tags in the timeline toolbar lists the timeline's tags with how many events use each. Choose one or more (or type others) and select Separate. Events carrying any of the chosen tags move into a track above; everything else stays in the track below. The view keeps its position, and both tracks pan and zoom together, using the same layout as comparisons. A duration that follows a moment on the other side keeps that moment's time. Both tracks are read-only; Rejoin returns to the whole timeline. Separation never changes or saves the timeline. To move what is in the upper track for good, Shift or scale these… in its bar returns to the whole timeline and shifts or scales those events.

Each track has its own summaries, so nearby moments and collapsed durations group within their own side. Server and desktop timelines show the saved version while separated; unsaved edits are kept and reappear when you rejoin. Complete in-memory timelines, such as browser drafts and offline HTML, include unsaved edits.

Views

A separation reads two filtered views of one saved state: entities with any of the tags, and entities with none of them. Each view is a full index of its filtered document, so summaries, duration bands, collapsed-duration clusters, pages of moments and of durations run at normal index speed and match the same rules as the whole timeline.

TimelineWhere views are built
Server (PostgreSQL)oc_views, with oc_view_nodes and oc_view_duration_nodes mirroring the main index tables. The first query for a filter builds the view from the saved document; later queries reuse it. Views belong to one saved revision: a save deletes them, and each timeline keeps its eight most recent. oc_view_overview, oc_view_events and oc_view_duration_overview are generated by the migration from the main traversal functions' own definitions, so both share one implementation.
Desktop .och fileA derived, disk-backed copy of the open file's baseline, built on first use. The two most recent views are kept until the file is closed or saved.
In-memoryTwo filtered indexes built in the browser when separating.

The timeline query endpoint accepts filter: {"tags": [...], "mode": "any" | "none"} on overview, events and durations queries, and {"kind": "tags"} returns up to 200 tags with counts, most used first.

This page is docs/tags.md in the source code, as this server runs it.