Skip to main content

SearchEntity

Contains additional information returned in search contexts.

searchExtra object

Extra search-related metadata.

scorenumber

The relevance score for this entity, based on the search.

highlight object

Selected text snippets from fields matching the query, which can be displayed to users for context. Matched terms are marked within each snippet; this specification is implementation-neutral about the specific mark tag (the examples use <em>).

property name* string[]
  • Array [
  • string
  • ]
  • segments object[]

    Part of the segments extension — see the Extensions guide. Only present when the implementation declares the segments extension in /capabilities.

    Locations inside the file where the full-text match occurred, allowing clients to deep-link the user to the match (e.g. a PDF page or an ELAN annotation's time range). Segments are optional — absent or empty for hits without structured content. They are ranked by relevance and capped at an implementation-defined limit.

  • Array [
  • oneOf

    A search match located on a page of a paginated document, such as a PDF.

    typestringrequired

    The segment type discriminator.

    Possible values: [page]

    pageintegerrequired

    The 1-based page number the match occurred on.

    Possible values: >= 1

    Example: 3
    highlightstring[]required

    Matched text fragments from this page, using the same marking convention as searchExtra.highlight.

  • ]
  • SearchEntity
    {
    "searchExtra": {
    "score": 0,
    "highlight": {},
    "segments": [
    {
    "type": "page",
    "page": 3,
    "highlight": [
    "string"
    ]
    },
    {
    "type": "time-aligned-annotation",
    "tier": "A_phrase-segnum-en",
    "startMs": 83000,
    "endMs": 87500,
    "highlight": [
    "string"
    ]
    }
    ]
    }
    }