Skip to main content
API reference sections

Schema

SearchHit

One result.

Type object

Shape

FieldTypeDescription
workspacerequiredstring
workspace_namerequiredstring
documentstring or null

Absent when the hit is the workspace itself.

nodestring or null
document_kindstring

Kind of the containing manifest entry. Unlike kind, this remains file when the matching fragment is its mirrored title.

Default ""

mimestring or null

MIME type of an opaque file, when the manifest recorded one.

Default null

kindrequiredstring
fieldrequiredstring

A [field] token.

titlerequiredstring

The document's name, from the listing.

breadcrumbrequiredstring

Workspace and the document's title path, assembled at query time - never stored, so renaming a document is one row and re-indexes nothing.

breadcrumb_spansrequiredarray of MatchSpan

Offsets in [Self::breadcrumb] explaining path matches.

snippetrequiredstring
spansrequiredarray of MatchSpan
lifecyclerequiredLifecycle

Whether a hit's document is in the trash.

Not a property of a fragment. Trash is a flag on the manifest entry ([ADR-95](../../../docs/decisions/ADR-076-100.md#adr-95-trash--a-document-in-the-trash-is-a-flag-on-its-manifest-entry)), so it is a property of the document, resolved by joining the mirrored listing. Storing it on every fragment is what used to let a hit and its own document title disagree about whether they were binned.

trashed_atinteger (int64) or null
trashed_bystring or null
scorerequirednumber (double)
observed_modified_at_msinteger (int64) or null

When this store last observed different searchable content for the containing document. Derived local metadata, not an authored timestamp, and deliberately not when we last looked.

workspace_last_used_at_msinteger (int64) or null

Most recent navigation into this workspace on this machine.

Example
{
  "workspace": "string",
  "workspace_name": "string",
  "document": "string",
  "node": "string",
  "document_kind": "",
  "mime": "string",
  "kind": "string",
  "field": "string",
  "title": "string",
  "breadcrumb": "string",
  "breadcrumb_spans": [
    {
      "start": 0,
      "end": 0
    }
  ],
  "snippet": "string",
  "spans": [
    {
      "start": 0,
      "end": 0
    }
  ],
  "lifecycle": "live",
  "trashed_at": 0,
  "trashed_by": "string",
  "score": 0,
  "observed_modified_at_ms": 0,
  "workspace_last_used_at_ms": 0
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.