In Relativity, search providers let the user to search across documents in the workspace. By default, Relativity supports the following search providers:
The Search Provider API service provides an API for the developers to interact with these Search Providers programmatically.
You can also use the Search Provider API services through REST. These interfaces support the same functionality as available through .NET. For more information, see Search Provider service in REST.
This page contains the following information:
Review the following information to learn about the methods used by the Agent Manager service.
The Relativity.Services.Interface namespace contains the ISearchProviderManage interface that exposes the following methods:
You can create a search provider by using the CreateAsync() method of the ISearchProviderManager interface.
The following code sample illustrates how to create a dtSearch:
public async Task<int> CreateSearchProviderAsync(int workspaceId, string searhProviderName, string dllName) { var searchProviderRequest = new SearchProviderRequest() { Active = true, AvailableForSearching = true, RankCacheMultiplier = 1, MinRank = 0, MaxRank = 100, Order = 10, Name = searhProviderName, DLL = dllName }; using(var searchProviderService = proxy.GetClient<ISearchProviderManager>()) { return await searchProviderService.CreateAsync(workspaceId, searchProviderRequest); } }
The following code sample illustrates how to create a dtSearch using the UpdateAsync() method of the ISearchProviderManager interface:
public async Task UpdateSearchProviderAsync(int workspaceId, int searchProviderArtifactId, SearchProviderRequest searchProviderReq) { using(var searchProviderService = proxy.GetClient<ISearchProviderManager>()) { await searchProviderService.UpdateAsync(workspaceId, searchProviderArtifactId, searchProviderReq); } }
The following code sample illustrates how to read a search provider using the ReadAsync() method of the ISearchProviderManager interface:
public async Task<SearchProviderResponse> ReadSearchProviderAsync(int workspaceId, int searchProviderArtifactId) { using(var searchProviderService = proxy.GetClient<ISearchProviderManager>()) { return await searchProviderservice.ReadAsync(workspaceId, searchProviderArtifactId); } }
The following code sample illustrates how to delete a search provider using the DeleteAsync() method of the ISearchProviderManager interface:
public async Task DeleteSearchProviderAsync(int workspaceId, int searchProviderArtifactId) { using(var searchProviderService = proxy.GetClient<ISearchProviderManager>()) { await searchProviderservice.DeleteAsync(workspaceId, searchProviderArtifactId); } }
The following code sample illustrates how to retrieve a list of objects with dependencies to the specified search provider using the GetDependencyList() method of the ISearchProviderManager interface:
public async Task<List<Dependency>> GetDependencyListAsync(int workspaceId, int searchProviderArtifactId) { using(var searchProviderService = proxy.GetClient<ISearchProviderManager>()) { return await searchProviderservice.GetDependencyList(workspaceId, searchProviderArtifactId); } }
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 |