User provided filter to limit retrieval based on Chunk
or Document
level metadata values. Example (genre = drama OR genre = action): key = "document.custom_metadata.genre" conditions = [{stringValue = "drama", operation = EQUAL}, {stringValue = "action", operation = EQUAL}]
JSON representation |
---|
{
"key": string,
"conditions": [
{
object ( |
Fields | |
---|---|
key |
Required. The key of the metadata to filter on. |
conditions[] |
Required. The |
Condition
Filter condition applicable to a single key.
JSON representation |
---|
{ "operation": enum ( |
Fields | |
---|---|
operation |
Required. Operator applied to the given key-value pair to trigger the condition. |
Union field value . The value type must be consistent with the value type defined in the field for the corresponding key. If the value types are not consistent, the result will be an empty set. When the CustomMetadata has a StringList value type, the filtering condition should use string_value paired with an INCLUDES/EXCLUDES operation, otherwise the result will also be an empty set. value can be only one of the following: |
|
stringValue |
The string value to filter the metadata on. |
numericValue |
The numeric value to filter the metadata on. |
Operator
Defines the valid operators that can be applied to a key-value pair.
Enums | |
---|---|
OPERATOR_UNSPECIFIED |
The default value. This value is unused. |
LESS |
Supported by numeric. |
LESS_EQUAL |
Supported by numeric. |
EQUAL |
Supported by numeric & string. |
GREATER_EQUAL |
Supported by numeric. |
GREATER |
Supported by numeric. |
NOT_EQUAL |
Supported by numeric & string. |
INCLUDES |
Supported by string only when CustomMetadata value type for the given key has a stringListValue . |
EXCLUDES |
Supported by string only when CustomMetadata value type for the given key has a stringListValue . |