Work with Data Grid

The Relativity platform provides several methods for programatically interacting with the data stored in the Data Grid. Review the use cases for the APIs to learn how you can use the APIs in your current development. For general information about using Data Grid storage, see the RelativityOne Documentation site.

This page contains the following information:

See these related pages:

Bulk load with Import API

To bulk load document extracted text into Data Grid, use the Import API. For more information, see Get started with the Import API.

Work with document text data

To work with Data Grid text fields for individual documents, use the Services API and the REST API. Both APIs support these operations of the Data Grid-enabled fields:

  • read
  • query
  • update

Supported data grid query operators

Use these operators to query Data Grid-enabled fields:

  • IS SET
  • IS NOT SET
    Notes:
  • The IS SET condition operator excludes the Data Grid records where the field is null or has an empty string value.
  • IS LIKE operator is not supported.

Services API query samples

Use the TextCondition class in the kCura.Relativity.Client namespace or the QueryAsync() method of the IObjectQueryManager interface to query Data Grid-enabled fields. For more information, see Search Relativity and Legacy Object Query Manager (.NET)

TextCondition

IS SET
TextCondition condition = new TextCondition("Extracted Text", TextConditionEnum.IsSet);
IS NOT SET
TextCondition condition = new TextCondition("Extracted Text", TextConditionEnum.IsSet);
NotCondition NotCriteria = new NotCondition(criteria);

ObjectQuery

IS SET
var results = QueryAsync(_workspaceArtifactId, _documentObjectType, "'Extracted Text' LIKE 'Jamison'", _indexOfFirstDocumentInResult, _lengthOfResults, _includePermissions, _queryToken);
IS NOT SET
var results = QueryAsync(_workspaceArtifactId, _documentObjectType, "NOT 'Extracted Text' ISSET", _indexOfFirstDocumentInResult, _lengthOfResults, _includePermissions, _queryToken);

REST API query samples

You can also use the Relativity REST API to query text in the Data Grid. For general REST query information, see Query for resources.

IS SET

You can use the IS SET operator with Data Grid-enabled fields in any REST query condition:

"query": {
   "condition":"'Extracted Text' ISSET",
   "fields":["Artifact ID", "Control Number", "Extracted Text"]
}
IS NOT SET

You can use the IS SET operator with Data Grid-enabled fields in any REST query condition:

"query": {
    "condition":"NOT 'Extracted Text' ISSET",
    "fields":["Artifact ID", "Control Number", "Extracted Text"]
}

Special considerations for updating Data Grid fields

When updating data grid-enabled document fields, note the following:

  • Audit records are created for updated Data Grid-enabled fields.
  • The oldValue and newValue stored with the Data Grid-enabled field audit details are truncated if they exceed 1,000,000 characters, same as the fields stored in the SQL database.
  • If you update both SQL and Data Grid fields, and the SQL portion of the update fails, in most cases the change to Data Grid is successfully committed and an audit record is created, while the SQL fields remains unchanged.

Additional Resources

DevHelp Community GitHub Release Notes NuGet

Share knowledge with the Relativity developer community.

Access tools and resources to build an application.

Review the most recent product release notes.

Create .NET Apps faster with NuGet.