Class: Turbopuffer::Models::AttributeSchemaConfig
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Turbopuffer::Models::AttributeSchemaConfig
- Defined in:
- lib/turbopuffer/models/attribute_schema_config.rb
Defined Under Namespace
Modules: Ann Classes: SparseKnn
Instance Attribute Summary collapse
-
#ann ⇒ Boolean, ...
Whether to create an approximate nearest neighbor index for the attribute.
-
#filterable ⇒ Boolean?
Whether or not the attributes can be used in filters.
-
#full_text_search ⇒ Boolean, ...
Whether this attribute can be used as part of a BM25 full-text search.
-
#fuzzy ⇒ Boolean?
Whether to enable Fuzzy filters on this attribute.
-
#glob ⇒ Boolean?
Whether to enable Glob filters on this attribute.
-
#regex ⇒ Boolean?
Whether to enable Regex filters on this attribute.
-
#sparse_knn ⇒ Turbopuffer::Models::AttributeSchemaConfig::SparseKnn?
Whether to create a sparse kNN index for the attribute.
-
#type ⇒ String
The data type of the attribute.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(distance_metric: nil) ⇒ Object
constructor
Configuration options for ANN (Approximate Nearest Neighbor) indexing.
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(distance_metric: nil) ⇒ Object
Configuration options for ANN (Approximate Nearest Neighbor) indexing.
|
|
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 60
|
Instance Attribute Details
#ann ⇒ Boolean, ...
Whether to create an approximate nearest neighbor index for the attribute. Can be a boolean or a detailed configuration object.
19 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 19 optional :ann, union: -> { Turbopuffer::AttributeSchemaConfig::Ann } |
#filterable ⇒ Boolean?
Whether or not the attributes can be used in filters.
25 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 25 optional :filterable, Turbopuffer::Internal::Type::Boolean |
#full_text_search ⇒ Boolean, ...
Whether this attribute can be used as part of a BM25 full-text search. Requires the ‘string` or `[]string` type, and by default, BM25-enabled attributes are not filterable. You can override this by setting `filterable: true`.
33 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 33 optional :full_text_search, union: -> { Turbopuffer::FullTextSearch } |
#fuzzy ⇒ Boolean?
Whether to enable Fuzzy filters on this attribute.
39 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 39 optional :fuzzy, Turbopuffer::Internal::Type::Boolean |
#glob ⇒ Boolean?
Whether to enable Glob filters on this attribute.
45 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 45 optional :glob, Turbopuffer::Internal::Type::Boolean |
#regex ⇒ Boolean?
Whether to enable Regex filters on this attribute.
51 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 51 optional :regex, Turbopuffer::Internal::Type::Boolean |
#sparse_knn ⇒ Turbopuffer::Models::AttributeSchemaConfig::SparseKnn?
Whether to create a sparse kNN index for the attribute. Requires the ‘{}f16` type.
58 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 58 optional :sparse_knn, -> { Turbopuffer::AttributeSchemaConfig::SparseKnn } |
#type ⇒ String
The data type of the attribute. Valid values: string, int, uint, float, uuid, datetime, bool, []string, []int, []uint, []float, []uuid, []datetime, []bool, [DIMS]f16, [DIMS]f32, {}f16.
12 |
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 12 required :type, String |
Class Method Details
.variants ⇒ Array(Boolean, Turbopuffer::Models::AttributeSchemaConfig::Ann::AnnConfig)
|
|
# File 'lib/turbopuffer/models/attribute_schema_config.rb', line 107
|