Manticoresearch.Highlight

October 22, 2025 ยท View on GitHub

Properties

NameTypeDescriptionNotes
fragmentSizeNumberMaximum size of the text fragments in highlighted snippets per field[optional]
limitNumberMaximum size of snippets per field[optional]
limitSnippetsNumberMaximum number of snippets per field[optional]
limitWordsNumberMaximum number of words per field[optional]
numberOfFragmentsNumberTotal number of highlighted fragments per field[optional]
afterMatchStringText inserted after the matched term, typically used for HTML formatting[optional] [default to '</strong>']
allowEmptyBooleanPermits an empty string to be returned as the highlighting result. Otherwise, the beginning of the original text would be returned[optional]
aroundNumberNumber of words around the match to include in the highlight[optional]
beforeMatchStringText inserted before the match, typically used for HTML formatting[optional] [default to '<strong>']
emitZonesBooleanEmits an HTML tag with the enclosing zone name before each highlighted snippet[optional]
encoderStringIf 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]
htmlStripModeStringDefines 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]
noMatchSizeNumberIf set to 1, allows an empty string to be returned as a highlighting result[optional]
orderStringSets the sorting order of highlighted snippets[optional]
preTagsStringText inserted before each highlighted snippet[optional] [default to '<strong>']
postTagsStringText inserted after each highlighted snippet[optional] [default to '</strong>']
startSnippetIdNumberSets the starting value of the %SNIPPET_ID% macro[optional]
useBoundariesBooleanDefines whether to additionally break snippets by phrase boundary characters[optional]

Enum: EncoderEnum

  • default (value: "default")

  • html (value: "html")

Enum: HtmlStripModeEnum

  • none (value: "none")

  • strip (value: "strip")

  • index (value: "index")

  • retain (value: "retain")

Enum: NoMatchSizeEnum

  • 0 (value: 0)

  • 1 (value: 1)

Enum: OrderEnum

  • asc (value: "asc")

  • desc (value: "desc")

  • score (value: "score")