Class: Turbopuffer::Models::NamespaceMultiQueryParams::Query
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Turbopuffer::Models::NamespaceMultiQueryParams::Query
- Defined in:
- lib/turbopuffer/models/namespace_multi_query_params.rb,
sig/turbopuffer/models/namespace_multi_query_params.rbs
Defined Under Namespace
Modules: Limit
Instance Attribute Summary collapse
-
#aggregate_by ⇒ Hash{Symbol=>Object}?
Aggregations to compute over all documents in the namespace that match the filters.
-
#compute_attributes ⇒ Hash{Symbol=>Object}?
Computes additional values on documents returned by a query.
-
#distance_metric ⇒ Symbol, ...
A function used to calculate vector similarity.
-
#exclude_attributes ⇒ Array<String>?
List of attribute names to exclude from the response.
-
#filters ⇒ Object?
Exact filters for attributes to refine search results for.
-
#group_by ⇒ Array<Object>?
Groups documents by the specified attributes (the "group key") before computing aggregates.
-
#include_attributes ⇒ Boolean, ...
Whether to include attributes in the response.
-
#limit ⇒ Integer, ...
Limits the documents returned by a query.
-
#rank_by ⇒ Object?
How to rank the documents in the namespace.
-
#top_k ⇒ Integer?
The number of results to return.
Instance Method Summary collapse
-
#initialize(aggregate_by: nil, compute_attributes: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, group_by: nil, include_attributes: nil, limit: nil, rank_by: nil, top_k: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see Query for more details.
- #to_hash ⇒ {
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(aggregate_by: nil, compute_attributes: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, group_by: nil, include_attributes: nil, limit: nil, rank_by: nil, top_k: nil) ⇒ Object
Some parameter documentations has been truncated, see Turbopuffer::Models::NamespaceMultiQueryParams::Query for more details.
Query, filter, full-text search and vector search documents.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 52 class Query < Turbopuffer::Internal::Type::BaseModel # @!attribute aggregate_by # Aggregations to compute over all documents in the namespace that match the # filters. # # @return [Hash{Symbol=>Object}, nil] optional :aggregate_by, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] # @!attribute compute_attributes # 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. # # @return [Hash{Symbol=>Object}, nil] optional :compute_attributes, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] # @!attribute distance_metric # A function used to calculate vector similarity. # # @return [Symbol, Turbopuffer::Models::DistanceMetric, nil] optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric } # @!attribute exclude_attributes # List of attribute names to exclude from the response. All other attributes will # be included in the response. # # @return [Array<String>, nil] optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String] # @!attribute filters # Exact filters for attributes to refine search results for. Think of it as a SQL # WHERE clause. # # @return [Object, nil] optional :filters, Turbopuffer::Internal::Type::Unknown # @!attribute group_by # Groups documents by the specified attributes (the "group key") before computing # aggregates. Aggregates are computed separately for each group. # # @return [Array<Object>, nil] optional :group_by, Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Internal::Type::Unknown] # @!attribute include_attributes # Whether to include attributes in the response. # # @return [Boolean, Array<String>, nil] optional :include_attributes, union: -> { Turbopuffer::IncludeAttributes } # @!attribute limit # Limits the documents returned by a query. # # @return [Integer, Turbopuffer::Models::Limit, nil] optional :limit, union: -> { Turbopuffer::NamespaceMultiQueryParams::Query::Limit } # @!attribute rank_by # How to rank the documents in the namespace. # # @return [Object, nil] optional :rank_by, Turbopuffer::Internal::Type::Unknown # @!attribute top_k # The number of results to return. # # @return [Integer, nil] optional :top_k, Integer # @!method initialize(aggregate_by: nil, compute_attributes: nil, distance_metric: nil, exclude_attributes: nil, filters: nil, group_by: nil, include_attributes: nil, limit: nil, rank_by: nil, top_k: nil) # Some parameter documentations has been truncated, see # {Turbopuffer::Models::NamespaceMultiQueryParams::Query} for more details. # # Query, filter, full-text search and vector search documents. # # @param aggregate_by [Hash{Symbol=>Object}] Aggregations to compute over all documents in the namespace that match the filte # # @param compute_attributes [Hash{Symbol=>Object}] Computes additional values on documents returned by a query. Each key is the nam # # @param distance_metric [Symbol, Turbopuffer::Models::DistanceMetric] A function used to calculate vector similarity. # # @param exclude_attributes [Array<String>] List of attribute names to exclude from the response. All other attributes will # # @param filters [Object] Exact filters for attributes to refine search results for. Think of it as a SQL # # @param group_by [Array<Object>] Groups documents by the specified attributes (the "group key") before computing # # @param include_attributes [Boolean, Array<String>] Whether to include attributes in the response. # # @param limit [Integer, Turbopuffer::Models::Limit] Limits the documents returned by a query. # # @param rank_by [Object] How to rank the documents in the namespace. # # @param top_k [Integer] The number of results to return. # Limits the documents returned by a query. # # @see Turbopuffer::Models::NamespaceMultiQueryParams::Query#limit module Limit extend Turbopuffer::Internal::Type::Union variant Integer # Limits the documents returned by a query. variant -> { Turbopuffer::Limit } # @!method self.variants # @return [Array(Integer, Turbopuffer::Models::Limit)] end end |
Instance Attribute Details
#aggregate_by ⇒ Hash{Symbol=>Object}?
Aggregations to compute over all documents in the namespace that match the filters.
58 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 58 optional :aggregate_by, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] |
#compute_attributes ⇒ Hash{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.
66 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 66 optional :compute_attributes, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] |
#distance_metric ⇒ Symbol, ...
A function used to calculate vector similarity.
72 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 72 optional :distance_metric, enum: -> { Turbopuffer::DistanceMetric } |
#exclude_attributes ⇒ Array<String>?
List of attribute names to exclude from the response. All other attributes will be included in the response.
79 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 79 optional :exclude_attributes, Turbopuffer::Internal::Type::ArrayOf[String] |
#filters ⇒ Object?
Exact filters for attributes to refine search results for. Think of it as a SQL WHERE clause.
86 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 86 optional :filters, Turbopuffer::Internal::Type::Unknown |
#group_by ⇒ Array<Object>?
Groups documents by the specified attributes (the "group key") before computing aggregates. Aggregates are computed separately for each group.
93 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 93 optional :group_by, Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Internal::Type::Unknown] |
#include_attributes ⇒ Boolean, ...
Whether to include attributes in the response.
99 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 99 optional :include_attributes, union: -> { Turbopuffer::IncludeAttributes } |
#limit ⇒ Integer, ...
Limits the documents returned by a query.
105 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 105 optional :limit, union: -> { Turbopuffer::NamespaceMultiQueryParams::Query::Limit } |
#rank_by ⇒ Object?
How to rank the documents in the namespace.
111 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 111 optional :rank_by, Turbopuffer::Internal::Type::Unknown |
#top_k ⇒ Integer?
The number of results to return.
117 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 117 optional :top_k, Integer |
Instance Method Details
#to_hash ⇒ {
131 |
# File 'sig/turbopuffer/models/namespace_multi_query_params.rbs', line 131
def to_hash: -> {
|