Class: Turbopuffer::Models::FullTextSearchConfig

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/turbopuffer/models/full_text_search_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(ascii_folding: nil, b: nil, case_sensitive: nil, k1: nil, language: nil, max_token_length: nil, remove_stopwords: nil, stemming: nil, tokenizer: nil) ⇒ Object

Some parameter documentations has been truncated, see Turbopuffer::Models::FullTextSearchConfig for more details.

Configuration options for full-text search.



# File 'lib/turbopuffer/models/full_text_search_config.rb', line 67


Instance Attribute Details

#ascii_foldingBoolean?

Whether to convert each non-ASCII character in a token to its ASCII equivalent, if one exists (e.g., à -> a). Defaults to ‘false` (i.e., no folding).



11
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 11

optional :ascii_folding, Turbopuffer::Internal::Type::Boolean

#bFloat?

The ‘b` document length normalization parameter for BM25. Defaults to `0.75`.



17
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 17

optional :b, Float

#case_sensitiveBoolean?

Whether searching is case-sensitive. Defaults to ‘false` (i.e. case-insensitive).



24
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 24

optional :case_sensitive, Turbopuffer::Internal::Type::Boolean

#k1Float?

The ‘k1` term saturation parameter for BM25. Defaults to `1.2`.



30
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 30

optional :k1, Float

#languageSymbol, ...

Describes the language of a text attribute. Defaults to ‘english`.



36
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 36

optional :language, enum: -> { Turbopuffer::Language }

#max_token_lengthInteger?

Maximum length of a token in bytes. Tokens larger than this value during tokenization will be filtered out. Has to be between ‘1` and `254` (inclusive). Defaults to `39`.



44
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 44

optional :max_token_length, Integer

#remove_stopwordsBoolean?

Removes common words from the text based on language. Defaults to ‘true` (i.e. remove common words).



51
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 51

optional :remove_stopwords, Turbopuffer::Internal::Type::Boolean

#stemmingBoolean?

Language-specific stemming for the text. Defaults to ‘false` (i.e., do not stem).



58
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 58

optional :stemming, Turbopuffer::Internal::Type::Boolean

#tokenizerSymbol, ...

The tokenizer to use for full-text search on an attribute. Defaults to ‘word_v3`.



65
# File 'lib/turbopuffer/models/full_text_search_config.rb', line 65

optional :tokenizer, enum: -> { Turbopuffer::Tokenizer }