Highlight

April 15, 2026 ยท View on GitHub

Properties

NameTypeDescriptionNotes
fragmentSizeIntegerMaximum size of the text fragments in highlighted snippets per field[optional]
limitIntegerMaximum size of snippets per field[optional]
limitSnippetsIntegerMaximum number of snippets per field[optional]
limitWordsIntegerMaximum number of words per field[optional]
numberOfFragmentsIntegerTotal number of highlighted fragments per field[optional]
afterMatchStringText inserted after the matched term, typically used for HTML formatting[optional]
allowEmptyBooleanPermits an empty string to be returned as the highlighting result. Otherwise, the beginning of the original text would be returned[optional]
aroundIntegerNumber of words around the match to include in the highlight[optional]
beforeMatchStringText inserted before the match, typically used for HTML formatting[optional]
emitZonesBooleanEmits an HTML tag with the enclosing zone name before each highlighted snippet[optional]
encoderEncoderEnumIf set to 'html', retains HTML markup when highlighting[optional]
fieldsHighlightFields[optional]
forceAllWordsBooleanIgnores the length limit until the result includes all keywords[optional]
forceSnippetsBooleanForces snippet generation even if limits allow highlighting the entire text[optional]
highlightQueryQueryFilter[optional]
htmlStripModeHtmlStripModeEnumDefines the mode for handling HTML markup in the highlight[optional]
limitsPerFieldBooleanDetermines whether the 'limit', 'limit_words', and 'limit_snippets' options operate as individual limits in each field of the document[optional]
noMatchSizeNoMatchSizeEnumIf set to 1, allows an empty string to be returned as a highlighting result[optional]
orderOrderEnumSets the sorting order of highlighted snippets[optional]
preTagsStringText inserted before each highlighted snippet[optional]
postTagsStringText inserted after each highlighted snippet[optional]
startSnippetIdIntegerSets the starting value of the %SNIPPET_ID% macro[optional]
useBoundariesBooleanDefines whether to additionally break snippets by phrase boundary characters[optional]

Enum: EncoderEnum

NameValue
DEFAULT"default"
HTML"html"

Enum: HtmlStripModeEnum

NameValue
NONE"none"
STRIP"strip"
INDEX"index"
RETAIN"retain"

Enum: NoMatchSizeEnum

NameValue
NUMBER_00
NUMBER_11

Enum: OrderEnum

NameValue
ASC"asc"
DESC"desc"
SCORE"score"