Analytics Classification Index (.NET)

A classification index is a type of index used by Relativity Analytics. This index type uses coded examples to build a Support Vector Machine (SVM) to predict the relevance of a document. It learns how terms are related to categories based on the contents of your documents and coding decisions made within the Active Learning project. This index type is used solely by the Active Learning application. For general information, see Analytics indexes and Creating an Active Learning project on the RelativityOne Documentation site.

The Analytics Classification Index API supports programmatically managing classification indexes in Relativity Analytics. It includes the following features:

  • Supports CRUD operations on classification indexes.
  • Provides helper methods that simplify working with index jobs. You can use these methods to submit and cancel jobs, and to check on their statuses. These jobs can populate new data, build new indexes, and activate indexes for use.

As a sample use case, you might use this API in an application to programmatically operate on a classification index.

You can also use the Classification Index API through REST. For more information, see Analytics Classification Index (REST).

This page contains the following information:

The Relativity.Analytics.Classification.SDK contains this API. For compatibility and package installation instructions, see Download the SDKs and NuGet packages.

Fundamentals for the Classification Index API

Review the following information to learn about the methods, classes, and enumerations used by the Classification Index API.

Guidelines for using the Classification Index API

Review the following guidelines for working with the Classification Index API.

Catch exceptions

When using any methods in the Classification Index API, catch the following exceptions:

  • PermissionException
  • ValidationException
  • Generic .NET Exception

Execute valid operations for the index state

Execute only valid operations for the state of an index. Only certain operations are valid for the current state of your index. See the following examples:

  • A call to cancel a running index job is only valid when a job is currently running for the index.
  • A call to build an index can't run on an index that hasn't been populated.
  • Note: To retrieve a list of valid operations, get the AnalyticsIndexStatus object. Examine the ConsoleButtons property on the returned object for a list of valid operations to call. You can also get additional information about the job from the StatusText and AdditionalStatusText properties. If you attempt to execute an invalid operation, you receive validation error. See Retrieve the status of a job.

Index states and job validation

When performing operations on an index, make sure that the operation is applicable to its current state.

Monitor the analysis progress

After submitting an index job, monitor its progress by making calls to its status. See Retrieve a classification index.

Create a classification index

Use the CreateAsync() method to add a new classification index to Relativity. Set the following properties on the ClassificationIndex object passed to the CreateAsync() method:

  • AnalyticsServer - an ArtifactRef object representing the Analytics server used to build the index. In RelativityOne environments, set the Artifact ID -1.
  • Name - the user-friendly name of the index.
  • Order - an integer representing the position of the index in drop-down menus. The default value is 0.
  • SearchableSet - an ArtifactRef object representing the saved search used to populate the searchable set.

When the operation succeeds, it returns the Artifact ID of the new index. Use this Artifact ID to submit the index for populating and building.

Retrieve a classification index

Use the ReadAsync() method to retrieve a classification index. Pass the Artifact IDs of the workspace and the index to this method. It returns a ClassificationIndex object. You can use this object to examine the index properties before submitting an index job, or updating or deleting an index.

Update a classification index

Use the UpdateAsync() method to modify a classification index. You can update multiple properties on a ClassificationIndex object. For a list of properties, see the ClassificationIndex class in Classes and enumerations.

Delete a classification index

Use the DeleteAsync() to remove a classification index from Relativity. Pass the Artifact IDs of the workspace and the index to this method.

Helper methods for classification index jobs

Use the following methods for managing jobs related to classification indexes.

Submit a classification index job

Use the SubmitJobAsync() method to submit a classification index job. Pass the Artifact IDs for the workspace and index, and a job type to this method. For a list of job types, see Classes and enumerations.

Retrieve the status of a job

Use the GetStatusAsyn() method to get the status of a classification index job. Pass the Artifact IDs of the workspace and the index to this method. It returns an AnalyticsIndexStatus object.

Cancel a job

Use the CancelJobAsync() method to cancel a running classification index job. Pass the Artifact IDs of the workspace and the index to this method.

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.