Class: Turbopuffer::Models::NamespaceQueryParams

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

Overview

Defined Under Namespace

Classes: Consistency

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Method Summary

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, #initialize, 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

This class inherits a constructor from Turbopuffer::Internal::Type::BaseModel

Instance Attribute Details

#aggregate_byHash{Symbol=>Object}?

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



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

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

#consistencyTurbopuffer::Models::NamespaceQueryParams::Consistency?

The consistency level for a query.



26
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 26

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

#distance_metricSymbol, ...

A function used to calculate vector similarity.



32
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 32

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.



39
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 39

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.



46
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 46

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

#group_byArray<String>?

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



53
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 53

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

#include_attributesBoolean, ...

Whether to include attributes in the response.



59
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 59

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

#namespaceString?



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

optional :namespace, String

#rank_byObject?

How to rank the documents in the namespace.



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

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

#top_kInteger?

The number of results to return.



71
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 71

optional :top_k, Integer

#vector_encodingSymbol, ...

The encoding to use for vectors in the response.



77
# File 'lib/turbopuffer/models/namespace_query_params.rb', line 77

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