Class: Google::Cloud::AIPlatform::V1::NearestNeighborQuery
- Inherits:
-
Object
- Object
- Google::Cloud::AIPlatform::V1::NearestNeighborQuery
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb
Overview
A query to find a number of similar entities.
Defined Under Namespace
Classes: Embedding, NumericFilter, Parameters, StringFilter
Instance Attribute Summary collapse
-
#embedding ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
Optional.
-
#entity_id ⇒ ::String
Optional.
-
#neighbor_count ⇒ ::Integer
Optional.
-
#numeric_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>
Optional.
-
#parameters ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
Optional.
-
#per_crowding_attribute_neighbor_count ⇒ ::Integer
Optional.
-
#string_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
Optional.
Instance Attribute Details
#embedding ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Embedding
Returns Optional. The embedding vector that be used for similar search.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#entity_id ⇒ ::String
Returns Optional. The entity id whose similar entities should be searched for. If embedding is set, search will use embedding instead of entity_id.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#neighbor_count ⇒ ::Integer
Returns Optional. The number of similar entities to be retrieved from feature view for each query.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#numeric_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter>
Returns Optional. The list of numeric filters.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#parameters ⇒ ::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::Parameters
Returns Optional. Parameters that can be set to tune query on the fly.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#per_crowding_attribute_neighbor_count ⇒ ::Integer
Returns Optional. Crowding is a constraint on a neighbor list produced by nearest neighbor search requiring that no more than sper_crowding_attribute_neighbor_count of the k neighbors returned have the same value of crowding_attribute. It's used for improving result diversity.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |
#string_filters ⇒ ::Array<::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::StringFilter>
Returns Optional. The list of string filters.
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 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'proto_docs/google/cloud/aiplatform/v1/feature_online_store_service.rb', line 135 class NearestNeighborQuery include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The embedding vector. # @!attribute [rw] value # @return [::Array<::Float>] # Optional. Individual value in the embedding. class Embedding include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # String filter is used to search a subset of the entities by using boolean # rules on string columns. # For example: if a query specifies string filter # with 'name = color, allow_tokens = \\{red, blue}, deny_tokens = \\{purple}',' # then that query will match entities that are red or blue, but if those # points are also purple, then they will be excluded even if they are # red/blue. Only string filter is supported for now, numeric filter will be # supported in the near future. # @!attribute [rw] name # @return [::String] # Required. Column names in BigQuery that used as filters. # @!attribute [rw] allow_tokens # @return [::Array<::String>] # Optional. The allowed tokens. # @!attribute [rw] deny_tokens # @return [::Array<::String>] # Optional. The denied tokens. class StringFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Numeric filter is used to search a subset of the entities by using boolean # rules on numeric columns. # For example: # Database Point 0: \\{name: “a” value_int: 42} \\{name: “b” value_float: 1.0} # Database Point 1: \\{name: “a” value_int: 10} \\{name: “b” value_float: 2.0} # Database Point 2: \\{name: “a” value_int: -1} \\{name: “b” value_float: 3.0} # Query: \\{name: “a” value_int: 12 operator: LESS} // Matches Point 1, 2 # \\{name: “b” value_float: 2.0 operator: EQUAL} // Matches Point 1 # @!attribute [rw] value_int # @return [::Integer] # int value type. # @!attribute [rw] value_float # @return [::Float] # float value type. # @!attribute [rw] value_double # @return [::Float] # double value type. # @!attribute [rw] name # @return [::String] # Required. Column name in BigQuery that used as filters. # @!attribute [rw] op # @return [::Google::Cloud::AIPlatform::V1::NearestNeighborQuery::NumericFilter::Operator] # Optional. This MUST be specified for queries and must NOT be specified # for database points. class NumericFilter include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Datapoints for which Operator is true relative to the query’s Value # field will be allowlisted. module Operator # Unspecified operator. OPERATOR_UNSPECIFIED = 0 # Entities are eligible if their value is < the query's. LESS = 1 # Entities are eligible if their value is <= the query's. LESS_EQUAL = 2 # Entities are eligible if their value is == the query's. EQUAL = 3 # Entities are eligible if their value is >= the query's. GREATER_EQUAL = 4 # Entities are eligible if their value is > the query's. GREATER = 5 # Entities are eligible if their value is != the query's. NOT_EQUAL = 6 end end # Parameters that can be overrided in each query to tune query latency and # recall. # @!attribute [rw] approximate_neighbor_candidates # @return [::Integer] # Optional. The number of neighbors to find via approximate search before # exact reordering is performed; if set, this value must be > # neighbor_count. # @!attribute [rw] leaf_nodes_search_fraction # @return [::Float] # Optional. The fraction of the number of leaves to search, set at query # time allows user to tune search performance. This value increase result # in both search accuracy and latency increase. The value should be between # 0.0 and 1.0. class Parameters include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end |