SearchSnippet
A single contextual snippet from a search result.
fieldField (string)required
Source field name (e.g., 'text_content')
textText (string)required
Snippet text with tags around matched terms
matched_termsstring[]required
Terms that matched in this snippet
context objectrequired
Context information for this snippet
typeType (string)required
Boundary type used for snippet extraction
Possible values: [sentence, paragraph, section, cropped]
section object
Markdown section heading path (e.g., 'Background > Methods')
- string
- null
string
offsetOffset (integer)required
Character position of snippet start in full document
cropped_at object
How snippet was cropped: 'maxLength' if truncated, 'boundary' if natural boundary, null if complete
- string
- null
string
Possible values: [maxLength, boundary]
relevance_scoreRelevance Score (number)
Snippet relevance score (0.0-1.0)
Possible values: >= 0 and <= 1
Default value:
1SearchSnippet
{
"field": "string",
"text": "string",
"matched_terms": [
"string"
],
"context": {
"type": "sentence",
"section": "string",
"offset": 0,
"cropped_at": "maxLength"
},
"relevance_score": 1
}