dtSearch Manager (REST)

Relativity's dtSearch engine provides advanced search functionality such as proximity, stemming, fuzzy searches, and Boolean operators. For more information, see dtSearch on the RelativityOne Documentation site.

In order to perform a dtSearch search, you must build and activate a dtSearch index. The dtSearch Index Manager API exposes these operations, and others, letting you programmatically manage dtSearch Indexes. A sample use case for the dtSearch Manager API is creating a custom application to programmatically run through the stages of index build rather than manually performing these tasks through the Relativity UI.

You can also use the dtSearch Manager API services through the .NET interfaces. These interfaces support the same functionality as available through REST. For more information, see dtSearch Manager API.

This page contains the following information:

Prerequisites for using the dtSearch Manager API

To begin developing with the dtSearch Manager services, complete the following prerequisites:

  • dtSearch Manager API SDK - Download the NuGet package called Relativity.DTSearch.SDK. You can easily add this NuGet package to your project through Visual Studio. For more information, see Quickstart: Install and use a package in Visual Studio on the Microsoft website.

CRUD operations

The dtSearch Manager API supports create, read, update, and delete operations on dtSearch indexes.

Create a dtSearch index

To create a new dtSearch, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes

Set the {{workspaceID}} variable to the Artifact ID of the workspace where you want to add a new dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes

When the request is successful, the response contains the Artifact ID of the new dtSearch index. It also returns the status code of 200.

Retrieve index metadata

You can retrieve the metadata for a dtSearch index. Send a GET request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620

Update a dtSearch index

You can update the settings on a dtSearch index such as its name, order, and other fields. To update a dtSearch index, send a PUT request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620

When the request is successful, it returns the status code of 200.

Delete a dtSearch index

To delete a dtSearch index, send a DELETE request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/delete-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

  <host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620/delete-index

When the request is successful, it returns the status code of 200.

Index build operations

The dtSearch Manager API supports programmatically managing index builds, activation, and other operations performed in Relativity on the dtSearch index console. For more information, see dtSearch on the RelativityOne Documentation site.

Build Index: Full

You must run a full build after initially creating a dtSearch index. To run a full build of a dtSearch index, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/full-build-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620/full-build-index

The body of the request contains the following:

{"isActive":true}

When the request is successful, it returns the status code of 200.

Build Index: Incremental

You can run an incremental build after adding or removing documents from your search. To run an incremental build of a dtSearch index, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/incremental-build-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/incremental-build-index

The body of the request contains the following:

{"isActive":true}

When the request is successful, it returns the status code of 200.

Build Index

You can run the following to first initiate an incremental dtSearch index build operation, if possible, or else run a full dtSearch index build operation. Send a POST request to the following URL:

<host>/Relativity.Rest/API/Relativity.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}/buildIndex

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/build-index

The body of the request contains the following:

{"isActive":true}

When the request is successful, it returns the status code of 200.

Cancel a dtSearch index build

To cancel an index build, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/cancel-build

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/cancel-build

When the request is successful, it returns the status code of 200.

Activate a dtSearch index

To activate a dtSearch index for searching, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/activate-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/activate-index

When the request is successful, it returns the status code of 200.

Compress a dtSearch index

You can compress a dtSearch index returning all sub-indexes with a fragmentation level greater than zero to a fragmentation level of zero. To compress an index, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/compress-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/compress-index

The body of the request contains the following:

{"isActive":true}

When the request is successful, it returns the status code of 200.

Deactivate index

To deactivate an index, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/deactivate-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/deactivate-index

When the request is successful, it returns the status code of 200.

Swap index

You can swap your index with a replacement index in order to use its resources while your index builds or is inactive or disabled for any reason. To swap indexes, send a POST request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/swap-index

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/swap-index

The body of the request contains the following:

  • oldSearchProviderID - the ArtifactID of the dtSearch index whose resources you want to swap.
  • newSearchProviderID - the ArtifactID of the replacement dtSearch index.
{
"oldSearchProviderID":1130118,
"newSearchProviderID":1128030
}

When the request is successful, it returns the status code of 200.

Retry index build errors

To retry errors that occurred during the index build, send a POST request to the following URL: 

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/retry-errors

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130118/retry-errors

When the request is successful, it returns the status code of 200.

Track index build progress

To get the progress on an index build, send a GET request to the following URL: 

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/index-job-progress

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1039620/dtsearch-indexes/1130117/index-job-progress

Helper methods

The dtSearch Manager API provides the following helper methods for returning workspace parameters for populating dtSearch saved search properties.

Get active indexes

To get a list of active indexes for a given workspace, send a GET request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/index-shares

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/3549690/dtsearch-indexes/index-shares

Get saved searches 

To get a list of saved searches for a given workspace, send a GET request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/saved-search

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/3549690/dtsearch-indexes/saved-search

The response contains the following fields:

  • Name - the name of the saved search.
  • ID - the Artifact ID of the saved search.

Get index share locations 

To get a list of index share locations for a given workspace, send a GET request to the following URL:

<host>/Relativity.Rest/API/Relativity.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/indexshares

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/Relativity.Compute.DtSearchIndexes/workspace/3549690/dtSearchIndexes/indexshares

Get index statistics

To get statistical data for a given index, send a GET request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/index-statistics

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620/index-statistics

Get document-level errors

To get a list of document-level errors that occurred during the index build, send a GET request to the following URL:

<host>/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/{{workspaceID}}/dtsearch-indexes/{{RelativitySearchProviderID}}/document-errors

Set the {{workspaceID}} variable to the Artifact ID of the workspace containing the dtSearch. Set the {{RelativitySearchProviderID}} variable to the Artifact ID of the dtSearch. See the following sample URL:

/Relativity.Rest/API/relativity-dtsearch/v1/workspaces/1017652/dtsearch-indexes/1039620/document-errors

Community Updates

Aero Developer FAQ Evolving the Platform Most recent release notes
Learn more Learn more Learn more

Additional Resources

   
Access Third-Party Tools with GitHub     Create .NET Apps Faster with NuGet
Visit github     visit nuget