Class: Turbopuffer::Models::HighlightConfigParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Turbopuffer::Models::HighlightConfigParams
- Defined in:
- lib/turbopuffer/models/highlight_config_params.rb,
sig/turbopuffer/models/highlight_config_params.rbs
Instance Attribute Summary collapse
-
#fragment_by ⇒ Symbol, ...
How to split a text attribute into fragments for highlighting.
-
#fragment_limit ⇒ Integer?
The maximum number of fragments to return.
-
#include_offsets ⇒ Symbol, ...
The units to report highlighted fragment offsets in.
-
#rank_fragments_by ⇒ Object?
How to rank candidate fragments within the attribute before selecting the top
fragment_limit.
Instance Method Summary collapse
-
#initialize(fragment_by: nil, fragment_limit: nil, include_offsets: nil, rank_fragments_by: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see HighlightConfigParams for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(fragment_by: nil, fragment_limit: nil, include_offsets: nil, rank_fragments_by: nil) ⇒ Object
Some parameter documentations has been truncated, see Turbopuffer::Models::HighlightConfigParams for more details.
Additional (optional) parameters for the Highlight compute expression.
|
|
# File 'lib/turbopuffer/models/highlight_config_params.rb', line 31
|
Instance Attribute Details
#fragment_by ⇒ Symbol, ...
How to split a text attribute into fragments for highlighting.
10 |
# File 'lib/turbopuffer/models/highlight_config_params.rb', line 10 optional :fragment_by, enum: -> { Turbopuffer::HighlightFragmentBy } |
#fragment_limit ⇒ Integer?
The maximum number of fragments to return. Defaults to 3.
16 |
# File 'lib/turbopuffer/models/highlight_config_params.rb', line 16 optional :fragment_limit, Integer |
#include_offsets ⇒ Symbol, ...
The units to report highlighted fragment offsets in.
22 |
# File 'lib/turbopuffer/models/highlight_config_params.rb', line 22 optional :include_offsets, enum: -> { Turbopuffer::HighlightOffsetUnits } |
#rank_fragments_by ⇒ Object?
How to rank candidate fragments within the attribute before selecting the top
fragment_limit. Defaults to the query's rank_by.
29 |
# File 'lib/turbopuffer/models/highlight_config_params.rb', line 29 optional :rank_fragments_by, Turbopuffer::Internal::Type::Unknown |
Instance Method Details
#to_hash ⇒ {
39 |
# File 'sig/turbopuffer/models/highlight_config_params.rbs', line 39
def to_hash: -> {
|