#[non_exhaustive]pub struct InlineDocumentEnrichmentConfiguration {
pub condition: Option<DocumentAttributeCondition>,
pub target: Option<DocumentAttributeTarget>,
pub document_content_operator: Option<DocumentContentOperator>,
}Expand description
Provides the configuration information for applying basic logic to alter document metadata and content when ingesting documents into Amazon Q.
To apply advanced logic, to go beyond what you can do with basic logic, see HookConfiguration .
For more information, see Custom document enrichment.
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.condition: Option<DocumentAttributeCondition>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.
target: Option<DocumentAttributeTarget>The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition .
document_content_operator: Option<DocumentContentOperator> TRUE to delete content if the condition used for the target attribute is met.
Implementations§
source§impl InlineDocumentEnrichmentConfiguration
impl InlineDocumentEnrichmentConfiguration
sourcepub fn condition(&self) -> Option<&DocumentAttributeCondition>
pub fn condition(&self) -> Option<&DocumentAttributeCondition>
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.
sourcepub fn target(&self) -> Option<&DocumentAttributeTarget>
pub fn target(&self) -> Option<&DocumentAttributeTarget>
The target document attribute or metadata field you want to alter when ingesting documents into Amazon Q.
For example, you can delete all customer identification numbers associated with the documents, stored in the document metadata field called 'Customer_ID' by setting the target key as 'Customer_ID' and the deletion flag to TRUE. This removes all customer ID values in the field 'Customer_ID'. This would scrub personally identifiable information from each document's metadata.
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 will then map your newly created document attribute to your index field.
You can also use this with DocumentAttributeCondition .
sourcepub fn document_content_operator(&self) -> Option<&DocumentContentOperator>
pub fn document_content_operator(&self) -> Option<&DocumentContentOperator>
TRUE to delete content if the condition used for the target attribute is met.
source§impl InlineDocumentEnrichmentConfiguration
impl InlineDocumentEnrichmentConfiguration
sourcepub fn builder() -> InlineDocumentEnrichmentConfigurationBuilder
pub fn builder() -> InlineDocumentEnrichmentConfigurationBuilder
Creates a new builder-style object to manufacture InlineDocumentEnrichmentConfiguration.
Trait Implementations§
source§impl Clone for InlineDocumentEnrichmentConfiguration
impl Clone for InlineDocumentEnrichmentConfiguration
source§fn clone(&self) -> InlineDocumentEnrichmentConfiguration
fn clone(&self) -> InlineDocumentEnrichmentConfiguration
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl PartialEq for InlineDocumentEnrichmentConfiguration
impl PartialEq for InlineDocumentEnrichmentConfiguration
source§fn eq(&self, other: &InlineDocumentEnrichmentConfiguration) -> bool
fn eq(&self, other: &InlineDocumentEnrichmentConfiguration) -> bool
self and other values to be equal, and is used
by ==.