GET /glossary/{id}/occurrences

GET /glossary/{id}/occurrences

Handler

GlossaryHandler.getOccurrences()

Note

Finds occurrences of a glossary term in content documents via FTS5 search.

Authentication

None.

Path Parameters

Parameter Type Description
slug string Project slug
id string Entry UUID

Query Parameters

None.

Request Body

None.

Success Response

Status: 200 OK

{
  "term": "Arcane Rift",
  "occurrences": [
    {
      "contentId": "uuid-string",
      "title": "Chapter 3 - The Awakening",
      "snippet": "...the Arcane Rift opened above the city...",
      "slugPath": "chapter-3-the-awakening",
      "occurrenceCount": 4
    }
  ],
  "total": 12,
  "docCount": 3,
  "scanPending": false
}

The scanPending field is true when FTS5 finds documents but stored mark counts are 0 and autoMark is enabled, indicating that marks are currently being applied by a background job.

Error Responses

Status Description
404 Entry not found
500 Server error
Note

If the search provider is nil (graceful degradation), returns empty occurrences with zero counts.