ConnectorLib Java 25.2
ConnectorLib Java SDK Programming Guide

# Add Metadata

Often repositories store metadata about the files they contain, such as who created a file and when it was last modified. Metadata might also include repository-specific information. For example, a repository storing information about products for sale might include a price and a description for each item. You can add this metadata to a document's metadata fields so that it is indexed.

You can add fields to a document like this:

           doc.getDoc().addFieldValue("MyField", "My Value");

This example adds a field `MyField` with the value `My Value`.

Fields can also have multiple values:

           doc.getDoc().addFieldValue("SecondField", "First value");
           doc.getDoc().addFieldValue("SecondField", "Second value");

Copyright 2025 Open Text
Version 25.2 | Last updated April 2025

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 ConnectorLib Java 25.2

Topic Title: Add Metadata