Search Terms Report Services (.NET)

Search terms reports provide the ability to identify documents containing specific keywords or terms. You can enter multiple terms and generate a report listing the number of hits for each term in a document. For more information, see Search terms report in the Relativity Documentation site.

The Search Terms Report Services API provides functionality for generating a search terms report, adding terms to an existing search terms report, retrying any errors, and viewing the build progress of a specific search terms report.

The following sample use cases illustrate how you can use this API:

  • Create a new search terms report.
  • Add or update terms in a search terms report.
  • Run terms against a new search terms report.
  • Refresh a search terms report when document results have changed.
  • Run additional terms on an existing search terms report.
  • Retry any errors from a previous run of this API.
  • Get the progress of any running terms in a search terms report.
  • Retrieve the report from executing a search terms report.

You can also use the Search Terms Report Services API through REST. For more information, see Search Terms Report Services (REST).

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

Fundamentals for the Search Terms Report Services API

Review the following information to learn about the methods and classes used by the Search Terms Report Services API.

Create a Search Term Report

The following code snippet demonstrates the workflow to create a new Search Terms Report using a combination of Object Manager and Search Terms Report Manager calls.

Create terms for a search terms report

Use the CreateTerms() method to create terms used in a search terms report. Pass the following arguments to this method:

  • Artifact ID of a workspace
  • Artifact ID of a search terms report
  • SearchTermsResultCreateRequest object - for a list of properties, see Classes and enumerations.

The CreateTerms() method returns a SearchTermsResultCreateResponse object. See Classes and enumerations.

Update terms for a search terms report

Use UpdateTerms() method to modify existing terms used in a search terms report. Pass the following arguments to this method:

  • Artifact ID of a workspace
  • Artifact ID of a search terms report
  • SearchTermsResultUpdateRequest object - for a list of properties, see Classes and enumerations.

Run all terms in a search terms report

Use the RunAllTerms() method to queue a Run All Terms job for a search terms report. This method generates counts for each term. You can use this method the first time you generate a report and to regenerate the count for a report already run.

The following code sample illustrates how to call the RunAllTerms() method by passing the Artifact IDs of a workspace and search terms report.

Run pending terms in a search terms report

Use the RunPendingTerms() method to queue a Run Pending Terms job for a search terms report. You can add terms to the report by updating any terms that have a pending status.

The following code sample illustrates how to call the RunPendingTerms() method by passing the Artifact IDs of a workspace and search terms report.

View the build progress of a search terms report

Use the GetProgress() method to view the build progress of a search terms report and related statistics.

The following code sample illustrates how to call the GetProgress() method by passing the Artifact IDs of a workspace and search terms report.

Retry errors in a search terms report

Use the RetryErrors() method to queue a Retry Errors job for the specified search terms report. This method attempts to regenerate the report for search terms that returned error messages.

The following code sample illustrates how to call the RetryErrors() method by passing the Artifact IDs of a workspace and search terms report.

Cancel a running search terms report job

Use the CancelJob() method to cancel a running search terms report job. The following code sample illustrates how to call the CancelJob() method by passing the Artifact IDs of a workspace and search terms report.

Retrieve the URL for the Search Terms Result tab

Use the GetResultsUrl() method to retrieve the URL used for navigating to the Search Terms Result tab with the appropriate filter criteria for this search terms report.

The following code sample illustrates how to call the GetResultsUrl() method by passing the Artifact IDs of a workspace and search terms report.

Retrieve the URL for a search terms report

Use the GetReportURL() method to retrieve the URL used for navigating to a search terms report.

The following code sample illustrates how to call the GetReportURL() method by passing the Artifact IDs of a workspace and search terms report.

Check whether an index contains a long text field

Use the IndexContainsLongTextField() method check whether a search index contains at least one long text field.

The following code sample illustrates how to call the IndexContainsLongTextField() method by passing the Artifact IDs of a workspace and search index.

Retrieve the report type choice IDs

Use the GetReportTypeIDs() method to retrieve the report type choice IDs for a workspace.

The following code sample illustrates how to call the GetReportTypeIDs() method by passing the Artifact ID of a workspace.

This method returns a Dictionary object containing the report type and Artifact ID. See the following example:

Copy

"Report only": 1035327,
"Report and tag": 1035328