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(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.

Parameters:

  • b (Float) (defaults to: nil)

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

  • case_sensitive (Boolean) (defaults to: nil)

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

  • k1 (Float) (defaults to: nil)

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

  • language (Symbol, Turbopuffer::Models::Language) (defaults to: nil)

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

  • max_token_length (Integer) (defaults to: nil)

    Maximum length of a token in bytes. Tokens larger than this value during tokeniz

  • remove_stopwords (Boolean) (defaults to: nil)

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

  • stemming (Boolean) (defaults to: nil)

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

  • tokenizer (Symbol, Turbopuffer::Models::Tokenizer) (defaults to: nil)

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



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

Instance Attribute Details

#bFloat?

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

Returns:

  • (Float, nil)


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

optional :b, Float

#case_sensitiveBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#k1Float?

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

Returns:

  • (Float, nil)


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

optional :k1, Float

#languageSymbol, ...

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

Returns:



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

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`.

Returns:

  • (Integer, nil)


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

optional :max_token_length, Integer

#remove_stopwordsBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#stemmingBoolean?

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

Returns:

  • (Boolean, nil)


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

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

#tokenizerSymbol, ...

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

Returns:



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

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