Class SearchStrategy (0.1.1)

SearchStrategy(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The search strategy for annotations value of the key.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

Name Description
search_strategy_type google.cloud.visionai_v1.types.DataSchemaDetails.SearchStrategy.SearchStrategyType
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. This field is a member of oneof_ _search_strategy_type.
confidence_score_index_config google.cloud.visionai_v1.types.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig
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.

Classes

ConfidenceScoreIndexConfig

ConfidenceScoreIndexConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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.

SearchStrategyType

SearchStrategyType(value)

The types of search strategies to be applied on the annotation key.