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
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.
-
#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<String>?
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, 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.
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, 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.
44 45 46 47 48 49 50 51 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 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 44 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 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<String>, nil] optional :group_by, Turbopuffer::Internal::Type::ArrayOf[String] # @!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, 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 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<String>] 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.
50 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 50 optional :aggregate_by, Turbopuffer::Internal::Type::HashOf[Turbopuffer::Internal::Type::Unknown] |
#distance_metric ⇒ Symbol, ...
A function used to calculate vector similarity.
56 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 56 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.
63 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 63 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.
70 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 70 optional :filters, Turbopuffer::Internal::Type::Unknown |
#group_by ⇒ Array<String>?
Groups documents by the specified attributes (the “group key”) before computing aggregates. Aggregates are computed separately for each group.
77 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 77 optional :group_by, Turbopuffer::Internal::Type::ArrayOf[String] |
#include_attributes ⇒ Boolean, ...
Whether to include attributes in the response.
83 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 83 optional :include_attributes, union: -> { Turbopuffer::IncludeAttributes } |
#limit ⇒ Integer, ...
Limits the documents returned by a query.
89 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 89 optional :limit, union: -> { Turbopuffer::NamespaceMultiQueryParams::Query::Limit } |
#rank_by ⇒ Object?
How to rank the documents in the namespace.
95 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 95 optional :rank_by, Turbopuffer::Internal::Type::Unknown |
#top_k ⇒ Integer?
The number of results to return.
101 |
# File 'lib/turbopuffer/models/namespace_multi_query_params.rb', line 101 optional :top_k, Integer |