Class ConfidenceScoreIndexConfig (0.1.0)

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.

Attributes

Name Description
field_path str
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", } } } } } }
threshold float
Required. The threshold.