#[non_exhaustive]pub struct DocumentAttributeCondition {
pub key: String,
pub operator: DocumentEnrichmentConditionOperator,
pub value: Option<DocumentAttributeValue>,
}Expand description
The condition used for the target document attribute or metadata field when ingesting documents into Amazon Q. You use this with DocumentAttributeTarget to apply the condition.
For example, you can create the 'Department' target field and have it prefill department names associated with the documents based on information in the 'Source_URI' field. Set the condition that if the 'Source_URI' field contains 'financial' in its URI value, then prefill the target field 'Department' with the target value 'Finance' for the document.
Amazon Q can't create a target field if it has not already been created as an index field. After you create your index field, you can create a document metadata field using DocumentAttributeTarget. Amazon Q then will map your newly created metadata field to your index field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key: StringThe identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q currently doesn't support _document_body as an attribute key used for the condition.
operator: DocumentEnrichmentConditionOperatorThe identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Kendra currently does not support _document_body as an attribute key used for the condition.
value: Option<DocumentAttributeValue>The value of a document attribute. You can only provide one value for a document attribute.
Implementations§
source§impl DocumentAttributeCondition
impl DocumentAttributeCondition
sourcepub fn key(&self) -> &str
pub fn key(&self) -> &str
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Q currently doesn't support _document_body as an attribute key used for the condition.
sourcepub fn operator(&self) -> &DocumentEnrichmentConditionOperator
pub fn operator(&self) -> &DocumentEnrichmentConditionOperator
The identifier of the document attribute used for the condition.
For example, 'Source_URI' could be an identifier for the attribute or metadata field that contains source URIs associated with the documents.
Amazon Kendra currently does not support _document_body as an attribute key used for the condition.
sourcepub fn value(&self) -> Option<&DocumentAttributeValue>
pub fn value(&self) -> Option<&DocumentAttributeValue>
The value of a document attribute. You can only provide one value for a document attribute.
source§impl DocumentAttributeCondition
impl DocumentAttributeCondition
sourcepub fn builder() -> DocumentAttributeConditionBuilder
pub fn builder() -> DocumentAttributeConditionBuilder
Creates a new builder-style object to manufacture DocumentAttributeCondition.
Trait Implementations§
source§impl Clone for DocumentAttributeCondition
impl Clone for DocumentAttributeCondition
source§fn clone(&self) -> DocumentAttributeCondition
fn clone(&self) -> DocumentAttributeCondition
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for DocumentAttributeCondition
impl Debug for DocumentAttributeCondition
source§impl PartialEq for DocumentAttributeCondition
impl PartialEq for DocumentAttributeCondition
source§fn eq(&self, other: &DocumentAttributeCondition) -> bool
fn eq(&self, other: &DocumentAttributeCondition) -> bool
self and other values to be equal, and is used
by ==.