Class: Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy
- Inherits:
-
Object
- Object
- Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/visionai/v1/warehouse.rb
Overview
The search strategy for annotations value of the key
.
Defined Under Namespace
Modules: SearchStrategyType Classes: ConfidenceScoreIndexConfig
Instance Attribute Summary collapse
-
#confidence_score_index_config ⇒ ::Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy::ConfidenceScoreIndexConfig
Optional.
-
#search_strategy_type ⇒ ::Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy::SearchStrategyType
The type of search strategy to be applied on the
key
above.
Instance Attribute Details
#confidence_score_index_config ⇒ ::Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy::ConfidenceScoreIndexConfig
Returns Optional. Configs the path to the confidence score, and the threshold. Only if the score is greater than the threshold, current field will be built into the index. Only applies to leaf nodes using EXACT_SEARCH or SMART_SEARCH.
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 1207 class SearchStrategy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Filter on the confidence score. Only adds to index if the confidence # score is higher than the threshold. # Example data schema: # key: "name-confidence-pair" # type: CUSTOMIZED_STRUCT # granularity: GRANULARITY_PARTITION_LEVEL # customized_struct_config { # field_schemas { # key: "name" # type: STRING # granularity: GRANULARITY_PARTITION_LEVEL # search_strategy { # search_strategy_type: SMART_SEARCH # confidence_score_index_config { # field_path: "name-confidence-pair.score" # threshold: 0.6 # } # } # } # field_schemas { # key: "score" # type: FLOAT # granularity: GRANULARITY_PARTITION_LEVEL # } # } # This means only "name" with score > 0.6 will be indexed. # @!attribute [rw] field_path # @return [::String] # Required. The path to the confidence score field. It is a string that # concatenates all the data schema keys along the path. See the example # above. If the data schema contains LIST, use '_ENTRIES' to concatenate. # Example data schema contains a list: # "key": "list-name-score", # "schemaDetails": { # "type": "LIST", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "listConfig": { # "valueSchema": { # "type": "CUSTOMIZED_STRUCT", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "customizedStructConfig": { # "fieldSchemas": { # "name": { # "type": "STRING", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "searchStrategy": { # "searchStrategyType": "SMART_SEARCH" # "confidence_score_index_config": { # "field_path": "list-name-score._ENTRIES.score", # "threshold": "0.9", # } # } # }, # "score": { # "type": "FLOAT", # "granularity": "GRANULARITY_PARTITION_LEVEL", # } # } # } # } # } # } # @!attribute [rw] threshold # @return [::Float] # Required. The threshold. class ConfidenceScoreIndexConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The types of search strategies to be applied on the annotation key. module SearchStrategyType # Annotatation values of the `key` above will not be searchable. NO_SEARCH = 0 # When searching with `key`, the value must be exactly as the annotation # value that has been ingested. EXACT_SEARCH = 1 # When searching with `key`, Warehouse will perform broad search based on # semantic of the annotation value. SMART_SEARCH = 2 end end |
#search_strategy_type ⇒ ::Google::Cloud::VisionAI::V1::DataSchemaDetails::SearchStrategy::SearchStrategyType
Returns The type of search strategy to be applied on the key
above.
The allowed search_strategy_type
is different for different data types,
which is documented in the DataSchemaDetails.DataType. Specifying
unsupported search_strategy_type
for data types will result in
INVALID_ARGUMENT error.
1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 |
# File 'proto_docs/google/cloud/visionai/v1/warehouse.rb', line 1207 class SearchStrategy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Filter on the confidence score. Only adds to index if the confidence # score is higher than the threshold. # Example data schema: # key: "name-confidence-pair" # type: CUSTOMIZED_STRUCT # granularity: GRANULARITY_PARTITION_LEVEL # customized_struct_config { # field_schemas { # key: "name" # type: STRING # granularity: GRANULARITY_PARTITION_LEVEL # search_strategy { # search_strategy_type: SMART_SEARCH # confidence_score_index_config { # field_path: "name-confidence-pair.score" # threshold: 0.6 # } # } # } # field_schemas { # key: "score" # type: FLOAT # granularity: GRANULARITY_PARTITION_LEVEL # } # } # This means only "name" with score > 0.6 will be indexed. # @!attribute [rw] field_path # @return [::String] # Required. The path to the confidence score field. It is a string that # concatenates all the data schema keys along the path. See the example # above. If the data schema contains LIST, use '_ENTRIES' to concatenate. # Example data schema contains a list: # "key": "list-name-score", # "schemaDetails": { # "type": "LIST", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "listConfig": { # "valueSchema": { # "type": "CUSTOMIZED_STRUCT", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "customizedStructConfig": { # "fieldSchemas": { # "name": { # "type": "STRING", # "granularity": "GRANULARITY_PARTITION_LEVEL", # "searchStrategy": { # "searchStrategyType": "SMART_SEARCH" # "confidence_score_index_config": { # "field_path": "list-name-score._ENTRIES.score", # "threshold": "0.9", # } # } # }, # "score": { # "type": "FLOAT", # "granularity": "GRANULARITY_PARTITION_LEVEL", # } # } # } # } # } # } # @!attribute [rw] threshold # @return [::Float] # Required. The threshold. class ConfidenceScoreIndexConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The types of search strategies to be applied on the annotation key. module SearchStrategyType # Annotatation values of the `key` above will not be searchable. NO_SEARCH = 0 # When searching with `key`, the value must be exactly as the annotation # value that has been ingested. EXACT_SEARCH = 1 # When searching with `key`, Warehouse will perform broad search based on # semantic of the annotation value. SMART_SEARCH = 2 end end |