Class: Turbopuffer::Models::NamespaceExplainQueryParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/turbopuffer/models/namespace_explain_query_params.rb,
sig/turbopuffer/models/namespace_explain_query_params.rbs

Overview

See Also:

  • Turbopuffer::Resources::Namespaces#explain_query

Defined Under Namespace

Modules: Limit Classes: Consistency

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::Turbopuffer

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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

#initializeObject



87
# File 'sig/turbopuffer/models/namespace_explain_query_params.rbs', line 87

def initialize: (

Instance Attribute Details

#aggregate_byHash{Symbol=>Object}?

Aggregations to compute over all documents in the namespace that match the filters.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


20
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 20

optional :aggregate_by, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown]

#compute_attributesHash{Symbol=>Object}?

Computes additional values on documents returned by a query. Each key is the name of the computed attribute; each value is an expression describing how to compute it.

Parameters:

  • (::Hash[Symbol, top])

Returns:

  • (Hash{Symbol=>Object}, nil)


28
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 28

optional :compute_attributes, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown]

#consistencyTurbopuffer::Models::NamespaceExplainQueryParams::Consistency?

The consistency level for a query.



34
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 34

optional :consistency, -> { Turbopuffer::NamespaceExplainQueryParams::Consistency }

#distance_metricSymbol, ...

A function used to calculate vector similarity.

Returns:



40
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 40

optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric }

#exclude_attributesArray<String>?

List of attribute names to exclude from the response. All other attributes will be included in the response.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


47
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 47

optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String]

#filtersObject?

Exact filters for attributes to refine search results for. Think of it as a SQL WHERE clause.

Parameters:

  • (top)

Returns:

  • (Object, nil)


54
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 54

optional :filters, Turbopuffer::Internal::Type::Unknown

#group_byArray<Object>?

Groups documents by the specified attributes (the "group key") before computing aggregates. Aggregates are computed separately for each group.

Parameters:

  • (::Array[top])

Returns:

  • (Array<Object>, nil)


61
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 61

optional :group_by, Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Internal::Type::Unknown]

#include_attributesBoolean, ...

Whether to include attributes in the response.

Returns:

  • (Boolean, Array<String>, nil)


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

optional :include_attributes, union: -> { Turbopuffer::IncludeAttributes }

#limitInteger, ...

Limits the documents returned by a query.

Returns:



73
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 73

optional :limit, union: -> { Turbopuffer::NamespaceExplainQueryParams::Limit }

#namespaceString?

Parameters:

  • (String)

Returns:

  • (String, nil)


13
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 13

optional :namespace, String

#rank_byObject?

How to rank the documents in the namespace.

Parameters:

  • (top)

Returns:

  • (Object, nil)


79
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 79

optional :rank_by, Turbopuffer::Internal::Type::Unknown

#top_kInteger?

The number of results to return.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


85
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 85

optional :top_k, Integer

#vector_encodingSymbol, ...

The encoding to use for vectors in the response.

Returns:



91
# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 91

optional :vector_encoding, enum: -> { Turbopuffer::VectorEncoding }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/turbopuffer/models/namespace_explain_query_params.rb', line 149

Instance Method Details

#to_hash{

Returns:

  • ({)


104
# File 'sig/turbopuffer/models/namespace_explain_query_params.rbs', line 104

def to_hash: -> {