Skip to main content

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:

  1. Access to the Zeta Alpha Platform UI
  2. A tenant created
  3. An index created
  4. An API key with ingestion-manager role
  5. 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:

  1. Navigate to your tenant and click View next to your target index
  2. Click View under Content Sources for the index
  3. Click Create Content Source
  4. Paste your JSON configuration
  5. 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.