Content Component 26.1
Content Component Help

# Change Document Field Values

To change field values in documents, use the DREREPLACE index action, or the Knowledge Discovery Admin interface.

Related Topics

- About Fields

## Change Document Field Values by Running an Index Action

You can change field values in documents by using the following index action:

    DREREPLACE?DatabaseMatch=Databases\n\nData#DREENDDATA\n\n

NOTE: This action requires a POST request method.

where:

`Databases` | is a list of one or more databases in which to replace the specified data. If you specify multiple databases, separate them with plus symbols (there must be no space before or after a plus symbol).
`Data` | is a list of field values to replace or delete in the Content component. Specify the fields and field values as follows:
    #DREALL
    #DREDBNAME databaseName
    #DREDOCID id or #DREDOCREF url or #DRESTATEID stateID
    #DREFIELDNAME fieldName
    #DREFIELDVALUE fieldValue
    #DREFIELDVALUEIFNOTFOUND fieldValue
    #DREDELETEFIELDVALUE fieldValue
    #DREDELETESINGLEFIELDVALUE fieldValue
    #DREDELETEFIELD fieldName
    #DREFIELDBITOR value (#DREFIELDBITAND value or #DREFIELDBITXOR value)
The data fields are described in the table below.
`#DREENDDATA` | must exist at the end of an action parameter block to signify the end of the action.

`DREREPLACE` Data Fields

Field | Description
--- | ---
`#DREALL` | Match all documents. This option is restricted only by the DatabaseMatch parameter supplied as part of the DREREPLACE request, or by database read-only status.
`#DREDBNAME databaseName` | The databases in which to match all documents. To specify more than one database, separate them with plus signs (+). Content ignores the DatabaseMatch parameter for the documents identified by `#DREDBNAME`.
`#DREDOCID id` | The ID of the document that contains the field to change or delete.
`#DREDOCREF url` | The reference of the document that contains the field to change or delete.
`#DRESTATEID stateID` | The stored state ID of an array of documents that contains the field to change or delete. The state ID returns from a query where StoreState was set to True.
`#DREFIELDNAME fieldName` | The name of the field whose value you want to change or delete. Note that in XML documents, `fieldName` must be fully qualified (for example, `XML/DOCUMENT/MYFIELD`).
`#DREFIELDVALUE fieldValue` | The new value for the field specified by `fieldName` .
`#DREFIELDVALUEIFNOTFOUND fieldValue` | The new value for the field specified by `fieldName` if the `fieldName/fieldValue` pair does not already exist.
`#DREFIELDVALUEIFNOFIELD fieldValue` | The new value for the field specified by `fieldName` if the `fieldName` does not already exist in the document.
`#DREDELETEFIELDVALUE fieldValue` `#DREDELETENOCASEFIELDVALUE fieldValue` | The value that the field specified by `fieldName` must contain for the field to be deleted. By default, the value matching is not case sensitive (the `NOCASE` specifier is optional), but you can use `#DREDELETECASEFIELDVALUE` to match case sensitively.
`#DREDELETECASEFIELDVALUE fieldValue` | The value (case sensitive) that the field specified by `fieldName` must contain for the field to be deleted.
`#DREDELETESINGLEFIELDVALUE fieldValue` `#DREDELETESINGLENOCASEFIELDVALUE fieldValue` | The value that the field specified by `fieldName` must contain for Content to delete it. This option deletes only the first instance of the `fieldName`/`fieldValue` pair. By default, the value matching is not case sensitive (the `NOCASE` specifier is optional), but you can use `#DREDELETESINGLECASEFIELDVALUE` to match case sensitively.
`#DREDELETESINGLECASEFIELDVALUE fieldValue` | The value (case sensitive) that the field specified by `fieldName` must contain for Content to delete it. This option deletes only the first instance of the `fieldName`/`fieldValue` pair.
`#DREDELETEWILDFIELDVALUE fieldValue` `#DREDELETEWILDCASEFIELDVALUE fieldValue` | The Wildcard value that the field specified by `fieldName` must contain for the field to be deleted. This operation matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character). By default, the value matching is case sensitive (the `CASE` specifier is optional), but you can use `#DREDELETEWILDNOCASEFIELDVALUE` to match case insensitively.
`#DREDELETEWILDNOCASEFIELDVALUE fieldValue` | The Wildcard value (case insensitive) that the field specified by `fieldName` must contain for the field to be deleted. This operation matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character).
`#DREDELETESINGLEWILDFIELDVALUE fieldValue` `#DREDELETESINGLEWILDCASEFIELDVALUE fieldValue` | The Wildcard value that the field specified by `fieldName` must contain for the first instance of the field to be deleted. This operation deletes only a single instance of the `fieldName`/`fieldValue` pair. It matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character). By default, the value matching is case sensitive (the `CASE` specifier is optional), but you can use `#DREDELETESINGLEWILDNOCASEFIELDVALUE` to match case insensitively.
`#DREDELETESINGLEWILDNOCASEFIELDVALUE fieldValue` | The Wildcard value (case insensitive) that the field specified by `fieldName` must contain for the first instance of the field to be deleted. This operation deletes only a single instance of the `fieldName`/``fieldValue`` pair. It matches Wildcards for UTF-8 (that is, `?` matches a single UTF-8 character).
`#DREDELETEFIELD fieldName` | The field to delete. You do not require a `#DRE*VALUE` parameter.
`#DREFIELDBITOR value` | Generally a 32-bit decimal integer. If this field is a NumericType field with the NumericIntegerOnly property, the value is a signed 64-bit integer. If the field is a BitFieldType field, the value must be a hexadecimal value. Content performs the bitwise OR operation on the field identified by the previous `#DREFIELDNAME`. For NumericType fields, if the field is not present in the document, it adds a field with value `0000000000` first, and then applies the bit operation.
`#DREXMLFIELDVALUE` | A block of XML data to insert into an XML document under the previous `#DREFIELDNAME`.

To specify multiple instances of `#DREDOCID`, `#DREDOCREF`, or `#DRESTATEID`, separate the entries with a percent-encoded plus sign or comma.

For example: `#DREDOCID 1,3,7-10` or `#DREDOCID REF1+REF2+REF3`. You must also set ReplaceAllRefs to `True` to perform actions on multiple documents.

NOTE: You cannot use DREREPLACE to update the values in SecurityType fields.

NOTE: OpenText generally recommends that you do not replace values in Index fields, because Content must reindex the documents being changed, which can slow the update process. Changes to numerical fields, numerical date fields, or fields with other properties, occur without reindexing, and so occur quickly.

Related Topics

- Send Data with a POST Method

## Change Document Field Values by Using Knowledge Discovery Admin

In the Replace tab on the Console page in the Control section of Knowledge Discovery Admin, you can use the wizard to change field values or delete fields from indexed documents. For more information, refer to the Knowledge Discovery Admin User Guide.

CAUTION: You cannot recover your original data after you have replaced or deleted values from indexed documents.

To replace or delete field values in indexed documents

1. On the Data Source page, click an option to specify the fields to replace or delete:

   1. Build the data to replace or delete manually. Click this option to add a new data source.

   2. UTF-8 encoded local file containing DREREPLACE parameters. Click Choose Files to browse to a file that already specifies the preceding information.

   3. Introduce some data that defines the fields and values to replace or delete. Copy and paste in text that specifies:

      1. the documents in which to delete or replace the field values
      2. the values to substitute, or whether to delete the field
      3. `#DREENDDATANOOP` to mark the end of the index action parameters

2. Click Next.

   1. If you chose to build the data to replace or delete manually, the Choose Data page opens. You can add a new data source and specify the documents and field values that you want to edit.
   2. If you chose to replace or delete data from local files, or to copy and paste text that specifies the fields and values to replace or delete, the Choose Database page opens. Select one or more databases in which to change the data. Alternatively, you can read the target database from the data.
3. Click Next. The Summary page opens.
4. Select a priority for the DREREPLACE action, which determines how the Content component queues the action. The Summary section displays the action that will be sent to the server. The action is automatically constructed as you complete the wizard. It is shown for reference only; you cannot edit the action directly.
5. Click Replace.

The Content component performs the replace action on the specified documents. The changes are not visible in index searches until the index cache is flushed to disk. Click Sync to flush the index cache.

If you need to edit any of your settings, you can click Previous to move back through the pages of the wizard, or click Reset to clear all settings and start again from the beginning.

Copyright 2025 Open Text
Version 26.1 | Last updated January 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Content Component 26.1

Topic Title: Change Document Field Values