dtSearch Manager service in 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 Relativity 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:
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes
View the descriptions of the fields in the request
The request contains the following fields. For more information, about the dtSearch index fields, see dtSearch on the Relativity documentation site.
- dtSearchIndexRequest - represents
- Name - the user-friendly name of the dtSearch index.
- Order - the numerical value designating the position of the index in the search indexes list.
- SearchSearchID - the Artifact ID of the saved search used to create the dtSearch index.
- RecognizeDates - a Boolean value indicating whether to make the index auto-recognize dates, email address, and credit card numbers. see Using dtSearch syntax options on the Relativity documentation site.
- SkipNumericValues - a Boolean value indicating whether to suppress indexing of numeric values in applications that do not require numeric range searching. By default, dtSearch indexes numbers both as text and as numeric values, which is necessary for numeric range searching.
- AccentSensitive - a Boolean value indicating whether to make the index sensitive to accents and other language-specific characters.
- IndexShareCodeArtifactID - the Artifact ID of the index share.
- EmailAddress - a semi-colon delimited list of email addresses to send a notification to once the index completes.
- NoiseWords - the index's noise words list.
- AlphabetText - the index's alphabet file.
- SubIndexSize - the size of the sub-index created by the dtSearch index. The minimum value is 1000.
- FragmentationThreshold - the fragmentation level at which the system automatically compresses a dtSearch sub-index during an incremental build. The value must be be equal to or greater than one.
- Priority - an integer value that defines the priority of the index build operation in the dtSearch index build queue.
- DirtySettings -
View a sample JSON request for creating a dtSearch index
{
"dtSearchIndexRequest":{
"Name":"dtsearchIndex",
"Order":10,
"SearchSearchID":1129095,
"RecognizeDates":false,
"SkipNumericValues":false,
"AccentSensitive":false,
"IndexShareCodeArtifactID":1016154,
"EmailAddress":"",
"NoiseWords":"a\r\nabout\r\nafter\r\nall\r\nalso\r\nan\r\nand\r\nanother\r\nany\r\nare\r\nas\r\nat\r\nbe\r\nbecause\r\nbeen\r\nbefore\r\nbeing\r\nbetween\r\nboth\r\nbut\r\nby\r\ncame\r\ncan\r\ncome\r\ncould\r\ndid\r\ndo\r\neach\r\neven\r\nfor\r\nfrom\r\nfurther\r\nfurthermore\r\nget\r\ngot\r\nhad\r\nhas\r\nhave\r\nhe\r\nher\r\nhere\r\nhi\r\nhim\r\nhimself\r\nhis\r\nhow\r\nhowever\r\ni\r\nif\r\nin\r\nindeed\r\ninto\r\nis\r\nit\r\nits\r\njust\r\nlike\r\nmade\r\nmany\r\nme\r\nmight\r\nmore\r\nmoreover\r\nmost\r\nmuch\r\nmust\r\nmy\r\nnever\r\nnot\r\nnow\r\nof\r\non\r\nonly\r\nor\r\nother\r\nour\r\nout\r\nover\r\nsaid\r\nsame\r\nsee\r\nshe\r\nshould\r\nsince\r\nsome\r\nstill\r\nsuch\r\ntake\r\nthan\r\nthat\r\nthe\r\ntheir\r\nthem\r\nthen\r\nthere\r\ntherefore\r\nthese\r\nthey\r\nthis\r\nthose\r\nthrough\r\nthus\r\nto\r\ntoo\r\nunder\r\nup\r\nvery\r\nwas\r\nway\r\nwe\r\nwell\r\nwere\r\nwhat\r\nwhen\r\nwhere\r\nwhich\r\nwhile\r\nwho\r\nwill\r\nwith\r\nwould\r\nyou\r\nyour\r\n",
"AlphabetText":"dtSearch Alphabet File\n\n[Letters] // Original letter, lower case, upper case, unaccented\n 0 0 0 0\n 1 1 1 1\n 2 2 2 2\n 3 3 3 3\n 4 4 4 4\n 5 5 5 5\n 6 6 6 6\n 7 7 7 7\n 8 8 8 8\n 9 9 9 9\n A a A A\n B b B B\n C c C C\n D d D D\n E e E E\n F f F F\n G g G G\n H h H H\n I i I I\n J j J J\n K k K K\n L l L L\n M m M M\n N n N N\n O o O O\n P p P P\n Q q Q Q\n R r R R\n S s S S\n T t T T\n U u U U\n V v V V\n W w W W\n X x X X\n Y y Y Y\n Z z Z Z\n _ _ _ _\n a a A a\n b b B b\n c c C c\n d d D d\n e e E e\n f f F f\n g g G g\n h h H h\n i i I i\n j j J j\n k k K k\n l l L l\n m m M m\n n n N n\n o o O o\n p p P p\n q q Q q\n r r R r\n s s S s\n t t T t\n u u U u\n v v V v\n w w W w\n x x X x\n y y Y y\n z z Z z\n\n[Hyphens]\n -\n\n[Spaces]\n \\09\\0a\\0c\\0d !@\"#$&'()*+,./:;<=>?[\\5c]^`{|}~\n\n[Ignore]\n \u0001\u0002\u0003\u0004\u0005\u0006\u0007\\08\u000b\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f%\n\n[End]\nCJKRanges = 2e80-ac00 ac00-d7af f900-faff fe30-fe4f \n",
"SubIndexSize":250000,
"FragmentationThreshold":9,
"Priority":1,
"DirtySettings":"<dtSearchDirtySetting><Upgraded>False</Upgraded><AccentSensitiveChanged>False</AccentSensitiveChanged><AlphabetChanged>False</AlphabetChanged><AutoRecognizeChanged>False</AutoRecognizeChanged><NoiseWordsChanged>False</NoiseWordsChanged></dtSearchDirtySetting>"
}
}
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118
View the descriptions of the fields in the response
The response contains the following fields. It also returns the status code of 200.
- ID - an internal ID for the dtSearch index.
- Name - the user-friendly name of the dtSearch index.
- SearchableSearchID - the Artifact ID of the saved search.
- RelativitySearchProviderID - the Artifact ID of the dtSearch index.
- RecognizeDates - a Boolean value indicating whether to make the index auto-recognize dates, email address, and credit card numbers.
- SkipNumericValues - a Boolean value indicating whether to suppress indexing of numeric values in applications that do not require numeric range searching. By default, dtSearch indexes numbers both as text and as numeric values, which is necessary for numeric range searching.
- AccentSensitive - a Boolean value indicating whether to make the index sensitive to accents and other language-specific characters.
- IndexShareCodeArtifactID - the Artifact ID of the index share.
- EmailAddress - a list of email notification recipients.
- NoiseWords - the index's noise words list.
- AlphabetText - the index's alphabet file.
- LastBuildError - the error message if the index failed. This field is empty if the index build is successful.
- Status -
- SubIndexSize - the size of the sub-index created by the dtSearch index.
- DirtySettings -
- LastBuildStartTime - a timestamp indicating the time of the last index build began.
- LastBuildEndTime - a timestamp indicating the time the last index build ended.
- LastIndexStartTime -
- DtSearchSourceIndexID - a value used during index builds to identify the original dtSearch index build ID.
- FragmentationThreshold - the fragmentation level at which the system automatically compresses a dtSearch sub-index during an incremental build.
View a sample JSON response
{
"ID":2007,
"Name":"dtsearch-test",
"SearchableSearchID":1038052,
"RelativitySearchProviderID":1130116,
"RecognizeDates":false,
"SkipNumericValues":false,
"AccentSensitive":false,
"IndexShareCodeArtifactID":1016154,
"EmailAddress":"",
"NoiseWords":"a\r\nabout\r\nafter\r\nall\r\nalso\r\nan\r\nand\r\nanother\r\nany\r\nare\r\nas\r\nat\r\nbe\r\nbecause\r\nbeen\r\nbefore\r\nbeing\r\nbetween\r\nboth\r\nbut\r\nby\r\ncame\r\ncan\r\ncome\r\ncould\r\ndid\r\ndo\r\neach\r\neven\r\nfor\r\nfrom\r\nfurther\r\nfurthermore\r\nget\r\ngot\r\nhad\r\nhas\r\nhave\r\nhe\r\nher\r\nhere\r\nhi\r\nhim\r\nhimself\r\nhis\r\nhow\r\nhowever\r\ni\r\nif\r\nin\r\nindeed\r\ninto\r\nis\r\nit\r\nits\r\njust\r\nlike\r\nmade\r\nmany\r\nme\r\nmight\r\nmore\r\nmoreover\r\nmost\r\nmuch\r\nmust\r\nmy\r\nnever\r\nnot\r\nnow\r\nof\r\non\r\nonly\r\nor\r\nother\r\nour\r\nout\r\nover\r\nsaid\r\nsame\r\nsee\r\nshe\r\nshould\r\nsince\r\nsome\r\nstill\r\nsuch\r\ntake\r\nthan\r\nthat\r\nthe\r\ntheir\r\nthem\r\nthen\r\nthere\r\ntherefore\r\nthese\r\nthey\r\nthis\r\nthose\r\nthrough\r\nthus\r\nto\r\ntoo\r\nunder\r\nup\r\nvery\r\nwas\r\nway\r\nwe\r\nwell\r\nwere\r\nwhat\r\nwhen\r\nwhere\r\nwhich\r\nwhile\r\nwho\r\nwill\r\nwith\r\nwould\r\nyou\r\nyour\r\n",
"AlphabetText":"dtSearch Alphabet File\n\n[Letters] // Original letter, lower case, upper case, unaccented\n 0 0 0 0\n 1 1 1 1\n 2 2 2 2\n 3 3 3 3\n 4 4 4 4\n 5 5 5 5\n 6 6 6 6\n 7 7 7 7\n 8 8 8 8\n 9 9 9 9\n A a A A\n B b B B\n C c C C\n D d D D\n E e E E\n F f F F\n G g G G\n H h H H\n I i I I\n J j J J\n K k K K\n L l L L\n M m M M\n N n N N\n O o O O\n P p P P\n Q q Q Q\n R r R R\n S s S S\n T t T T\n U u U U\n V v V V\n W w W W\n X x X X\n Y y Y Y\n Z z Z Z\n _ _ _ _\n a a A a\n b b B b\n c c C c\n d d D d\n e e E e\n f f F f\n g g G g\n h h H h\n i i I i\n j j J j\n k k K k\n l l L l\n m m M m\n n n N n\n o o O o\n p p P p\n q q Q q\n r r R r\n s s S s\n t t T t\n u u U u\n v v V v\n w w W w\n x x X x\n y y Y y\n z z Z z\n\n[Hyphens]\n -\n\n[Spaces]\n \\09\\0a\\0c\\0d !@\"#$&'()*+,./:;<=>?[\\5c]^`{|}~\n\n[Ignore]\n \u0001\u0002\u0003\u0004\u0005\u0006\u0007\\08\u000b\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f%\n\n[End]\nCJKRanges = 2e80-ac00 ac00-d7af f900-faff fe30-fe4f \n",
"LastBuildError":"",
"Status":"New",
"SubIndexSize":250000,
"DirtySettings":"<dtSearchDirtySetting><AccentSensitiveChanged>false</AccentSensitiveChanged><AlphabetChanged>false</AlphabetChanged><AutoRecognizeChanged>false</AutoRecognizeChanged><NoiseWordsChanged>false</NoiseWordsChanged><Upgraded>false</Upgraded></dtSearchDirtySetting>",
"LastBuildStartTime":"0001-01-01T00:00:00",
"LastBuildEndTime":"0001-01-01T00:00:00",
"LastIndexStartTime":"0001-01-01T00:00:00",
"DtSearchSourceIndexID":0,
"FragmentationThreshold":9
}
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118
The request contains the following fields:
- Name - the user-friendly name of the dtSearch index.
- Order - the numerical value designating the position of the index in the search indexes list.
- SearchSearchID - the Artifact ID of the saved search used to create the dtSearch index.
- RecognizeDates - a Boolean value indicating whether to make the index auto-recognize dates, email address, and credit card numbers. see Using dtSearch syntax optionson the Relativity documentation site.
- SkipNumericValues - a Boolean value indicating whether to suppress indexing of numeric values in applications that do not require numeric range searching. By default, dtSearch indexes numbers both as text and as numeric values, which is necessary for numeric range searching.
- AccentSensitive - a Boolean value indicating whether to make the index sensitive to accents and other language-specific characters.
- IndexShareCodeArtifactID - the Artifact ID of the index share.
- EmailAddress - a semi-colon delimited list of email addresses to send a notification to once the index completes.
- NoiseWords - the index's noise words list.
- AlphabetText - the index's alphabet file.
- SubIndexSize - the size of the sub-index created by the dtSearch index. The minimum value is 1000.
- FragmentationThreshold - the fragmentation level at which the system automatically compresses a dtSearch sub-index during an incremental build. The value must be be equal to or greater than one.
- Priority - an integer value
- DirtySettings -
View a sample JSON request for updating a dtSearch index
{
"dtSearchIndexRequest":{
"Name":"IndexName-2",
"Order":10,
"SearchSearchID":1036361,
"RecognizeDates":true,
"SkipNumericValues":true,
"AccentSensitive":false,
"IndexShareCodeArtifactID":1016154,
"EmailAddress":"user@relativity.com",
"NoiseWords":"a\r\nabout\r\nafter\r\nall\r\nalso\r\nan\r\nand\r\nanother\r\nany\r\nare\r\nas\r\nat\r\nbe\r\nbecause\r\nbeen\r\nbefore\r\nbeing\r\nbetween\r\nboth\r\nbut\r\nby\r\ncame\r\ncan\r\ncome\r\ncould\r\ndid\r\ndo\r\neach\r\neven\r\nfor\r\nfrom\r\nfurther\r\nfurthermore\r\nget\r\ngot\r\nhad\r\nhas\r\nhave\r\nhe\r\nher\r\nhere\r\nhi\r\nhim\r\nhimself\r\nhis\r\nhow\r\nhowever\r\ni\r\nif\r\nin\r\nindeed\r\ninto\r\nis\r\nit\r\nits\r\njust\r\nlike\r\nmade\r\nmany\r\nme\r\nmight\r\nmore\r\nmoreover\r\nmost\r\nmuch\r\nmust\r\nmy\r\nnever\r\nnot\r\nnow\r\nof\r\non\r\nonly\r\nor\r\nother\r\nour\r\nout\r\nover\r\nsaid\r\nsame\r\nsee\r\nshe\r\nshould\r\nsince\r\nsome\r\nstill\r\nsuch\r\ntake\r\nthan\r\nthat\r\nthe\r\ntheir\r\nthem\r\nthen\r\nthere\r\ntherefore\r\nthese\r\nthey\r\nthis\r\nthose\r\nthrough\r\nthus\r\nto\r\ntoo\r\nunder\r\nup\r\nvery\r\nwas\r\nway\r\nwe\r\nwell\r\nwere\r\nwhat\r\nwhen\r\nwhere\r\nwhich\r\nwhile\r\nwho\r\nwill\r\nwith\r\nwould\r\nyou\r\nyour\r\n",
"AlphabetText":"dtSearch Alphabet File\n\n[Letters] // Original letter, lower case, upper case, unaccented\n 0 0 0 0\n 1 1 1 1\n 2 2 2 2\n 3 3 3 3\n 4 4 4 4\n 5 5 5 5\n 6 6 6 6\n 7 7 7 7\n 8 8 8 8\n 9 9 9 9\n A a A A\n B b B B\n C c C C\n D d D D\n E e E E\n F f F F\n G g G G\n H h H H\n I i I I\n J j J J\n K k K K\n L l L L\n M m M M\n N n N N\n O o O O\n P p P P\n Q q Q Q\n R r R R\n S s S S\n T t T T\n U u U U\n V v V V\n W w W W\n X x X X\n Y y Y Y\n Z z Z Z\n _ _ _ _\n a a A a\n b b B b\n c c C c\n d d D d\n e e E e\n f f F f\n g g G g\n h h H h\n i i I i\n j j J j\n k k K k\n l l L l\n m m M m\n n n N n\n o o O o\n p p P p\n q q Q q\n r r R r\n s s S s\n t t T t\n u u U u\n v v V v\n w w W w\n x x X x\n y y Y y\n z z Z z\n\n[Hyphens]\n -\n\n[Spaces]\n \\09\\0a\\0c\\0d !@\"#$&'()*+,./:;<=>?[\\5c]^`{|}~\n\n[Ignore]\n \u0001\u0002\u0003\u0004\u0005\u0006\u0007\\08\u000b\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f%\n\n[End]\nCJKRanges = 2e80-ac00 ac00-d7af f900-faff fe30-fe4f \n",
"SubIndexSize":250000,
"FragmentationThreshold":9,
"Priority":1,
"DirtySettings":"<dtSearchDirtySetting><AccentSensitiveChanged>false</AccentSensitiveChanged><AlphabetChanged>false</AlphabetChanged><AutoRecognizeChanged>false</AutoRecognizeChanged><NoiseWordsChanged>false</NoiseWordsChanged><Upgraded>false</Upgraded></dtSearchDirtySetting>"
}
}
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/deleteIndex
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130116/deleteIndex
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 Relativity 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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/fullBuildIndex
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/fullBuildIndex
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/incrementalBuildIndex
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/incrementalBuildIndex
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:
POST /Relativity.Rest/API/Relativity.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/buildIndex
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}//cancelBuild
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/cancelBuild
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/activateIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/activateIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/compressIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/compressIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/deactivateIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/deactivateIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/swapIndex HTTP/1.1
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/1018292/dtSearchIndexes/swapIndex HTTP/1.1
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/retryErrors HTTP/1.1
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130118/retryErrors HTTP/1.1
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/indexJobProgress HTTP/1.1
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130117/indexJobProgress HTTP/1.1
View the descriptions of the fields in the response
The response contains the following fields:
- IndexName - the user-friendly name of the dtSearch index.
- JobType- the type of index build operation (full build, incremental, compress).
- JobStatus - the current state of the job (indexing, populating, finalizing, error).
- JobStage - the current stage of the job (initializing, creating population table, indexing, complete).
- IsStageInError - a Boolean value indicating whether the stage is in an error state.
- TotalIndexed - the total number of documents indexed.
- TotalErrored - the total number of documents errored.
- ProgressPercentage - the percentage of the job completed.
- JobdurationString - a timestamp indicating the total time spent on the job.
- IndexBuildDurationString - a timestamp indicating the time spent by the index workers indexing the saved search.
- CanActivate - a Boolean value indicating whether the index is ready to be activated.
View a sample JSON response
{
"IndexName":"IndexName-2",
"JobType":"No Active Job",
"JobStatus":"",
"JobStage":-999,
"IsStageInError":false,
"TotalIndexed":0,
"TotalErrored":0,
"ProgressPercentage":0.0,
"JobDurationString":"00:00:00",
"IndexBuildDurationString":"00:00:00",
"CanActivate":true
}
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.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
View a sample JSON response
[
{
"Name":"\\\\fileshareuncpath\\directoryname\\dtSearchPath\\",
"ID":1016154
}
{
"Name":"\\\\fileshareuncpath2\\directoryname2\\dtSearchPath2\\",
"ID":1016155
}
]
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/savedsearch
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/savedsearch
The response contains the following fields:
- Name - the name of the saved search.
- ID - the Artifact ID of the saved search.
View a sample JSON response
[
{
"Name":"All Documents",
"ID":1038052
},
{
"Name":"Extracted Text Only",
"ID":1038051
},
{
"Name":"Produced Documents",
"ID":1036361
}
]
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
View a sample JSON response
[
{
"Name":"\\\\fileshareuncpath\\directoryname\\dtSearchPath\\",
"ID":1016154
}
{
"Name":"\\\\fileshareuncpath2\\directoryname2\\dtSearchPath2\\",
"ID":1016155
}
]
Get index statistics
To get statistical data for a given index, send a GET request to the following URL:
<host>/Relativity.Rest/API/Relativity.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/indexStatistics
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130132/indexStatistics
View the descriptions of the fields in the response
The response contains the following fields:
- DocumentCount - the total number of documents in the index.
- IndexSize - the size of the index in bytes.
- LastBuiltOn - a timestamp indicating when the index was last built.
- LastModifiedOn - a timestamp indicating when the index was last modified.
- BuildTime - how long the last build took to complete in hours, minutes, and seconds.
View a sample JSON response
{
"DocumentCount":300,
"IndexSize":29952863,
"LastBuiltOn":"2019-06-13T16:38:02",
"LastModifiedOn":"2019-06-13T16:38:02",
"BuildTime":"00:00:16"
}
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.Compute.DtSearchIndexes/workspace/{{workspaceID}}/dtSearchIndexes/{{RelativitySearchProviderID}}/documenterrors
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.Compute.DtSearchIndexes/workspace/1018292/dtSearchIndexes/1130132/documenterrors
View a sample JSON response
[
{
"ArtifactID": 1054057,
"ErrorMessage": "Error during read -> Invalid URI: The format of the URI could not be determined."
},
{
"ArtifactID" : 1054058,
"ErrorMessage: "Error during read -> Unable to locate file"
}
]