The Open API specification for Synapse is now available for download!

Download Open API Spec

HighlightField

org.sagebionetworks.repo.model.search.dsl.HighlightField

Per-field highlight options, carried as the value of a Highlight fields entry (the map key is the column name). Any option set here overrides the top-level highlight option for this field.

Field Type Description
fragment_size INTEGER Optional. Maximum characters per highlighted fragment. Capped server-side.
fragment_offset INTEGER Optional. Character offset at which to start highlighting (fvh only).
no_match_size INTEGER Optional. Number of leading characters to return when there is no match.
order STRING Optional. Fragment ordering: none (default) or score.
fragmenter STRING Optional. Fragmentation strategy: simple or span (plain highlighter).
boundary_scanner STRING Optional. Boundary detection: chars, sentence, or word.
boundary_scanner_locale STRING Optional. Locale used by the boundary scanner.
boundary_chars STRING Optional. Characters treated as boundaries by the chars scanner.
boundary_max_scan INTEGER Optional. How far the boundary scanner looks for a boundary.
max_fragment_length INTEGER Optional. Maximum length of a fragment.
max_analyzer_offset INTEGER Optional. Maximum character offset analyzed for highlighting.
phrase_limit INTEGER Optional. Maximum number of matching phrases considered (fvh only).
require_field_match BOOLEAN Optional. Whether only fields that matched the query are highlighted. Default true.
highlight_filter BOOLEAN Optional. Whether to highlight only fields that passed the query filter.
force_source BOOLEAN Optional. Whether to highlight from the original _source rather than stored fields.
tags_schema STRING Optional. Built-in tag schema (styled) for the highlight markup.
type STRING Optional. Highlighter implementation: unified (default), plain, or fvh. The semantic highlighter is rejected.
number_of_fragments INTEGER Optional. Maximum number of fragments to return for this field. Capped server-side.
pre_tags ARRAY<STRING> Optional. Opening tags wrapped around highlighted terms.
post_tags ARRAY<STRING> Optional. Closing tags wrapped around highlighted terms.
matched_fields ARRAY<STRING> Optional. Other fields whose matches also highlight this field (fvh only).
highlight_query Query

A single OpenSearch query DSL clause. Exactly one of the properties below may be set — the set property names the clause kind. See query vs. filter context and term-level vs. full-text queries.

The field-keyed leaf clauses (match, term, range, ...) are maps whose key is the column name and whose value is the per-field options object — only the long form is accepted (e.g. {"match":{"title":{"query":"x"}}}, not the {"match":{"title":"x"}} shorthand). The compound clauses (bool, dis_max, ...) nest further Query DSL clauses recursively.