Create a Document Edit
A Document Edit enables you to override initial document data by creating an enhancement that contains the edited fields. These edited fields take priority over the initial values from the document source.
Prerequisites
Before you begin, ensure you have:
- Access to the Zeta Alpha Platform UI
- A tenant created
- An index created
- An API key with
ingestion-manager
role - A document already ingested from a source connector
Step 1: Create the Edit Enhancement Connector
To create an edit enhancement connector, define a configuration file with the following structure:
{
"name": "My Edit Enhancement connector",
"description": "My Edit Enhancement connector",
"is_indexable": true,
"connector": "edit_enhancement",
"connector_configuration": {
"enhancement_id": "edit",
}
}
Step 2: Add Field Mapping Configuration
The field mapping configuration maps the fields sent by the client to the fields of the index. Define the mappings in the field_mappings
field of the connector configuration.
Example Field Mappings
The following example shows field mappings for the default index fields:
{
...
"connector_configuration": {
...
"field_mappings": [
{
"content_source_field_name": "metadata.name",
"index_field_name": "DCMI.title"
},
{
"content_source_field_name": "metadata.description",
"index_field_name": "DCMI.abstract"
},
...
}
}
Step 3: Create the Edit Enhancement Content Source
To create the edit enhancement content source in the Zeta Alpha Platform UI:
- Navigate to your tenant and click View next to your target index
- Click View under Content Sources for the index
- Click Create Content Source
- Paste your JSON configuration
- Click Submit
Ingest a Document Edit
Once the edit_enhancement
content source is configured, you can apply an edit to a document by calling the POST /ingestion/documents/{document_id}/edits
endpoint. For complete endpoint details, see the Ingestion API Reference.