Laserfiche.Repository.Api.Client  1.1.8
Loading...
Searching...
No Matches
SearchesClient Class Reference
Inheritance diagram for SearchesClient:
BaseClient ISearchesClient ISearchesClient

Public Member Functions

virtual async Task< ODataValueOfBooleanCancelOrCloseSearchAsync (string repoId, string searchToken, CancellationToken cancellationToken=default(CancellationToken))
 Cancels or closes a search operation.
 
virtual async Task< AcceptedOperationCreateSearchOperationAsync (string repoId, AdvancedSearchRequest request=null, CancellationToken cancellationToken=default(CancellationToken))
 Runs a search in the specified repository.
 
virtual async Task< ODataValueContextOfIListOfContextHitGetSearchContextHitsAsync (string repoId, string searchToken, int rowNumber, string prefer=null, string select=null, string orderby=null, int? top=null, int? skip=null, bool? count=null, CancellationToken cancellationToken=default(CancellationToken))
 Returns the context hits associated with a search result entry.
 
async Task GetSearchContextHitsForEachAsync (Func< ODataValueContextOfIListOfContextHit, Task< bool > > callback, string repoId, string searchToken, int rowNumber, string prefer=null, string select=null, string orderby=null, int? top=null, int? skip=null, bool? count=null, int? maxPageSize=null, CancellationToken cancellationToken=default)
 Returns the context hits associated with a search result entry using paging. Page results are returned to the callback .
 
async Task< ODataValueContextOfIListOfContextHitGetSearchContextHitsNextLinkAsync (string nextLink, int? maxPageSize=null, CancellationToken cancellationToken=default)
 Returns the context hits associated with a search result entry using a nextlink.
 
virtual async Task< ODataValueContextOfIListOfEntryGetSearchResultsAsync (string repoId, string searchToken, bool? groupByEntryType=null, bool? refresh=null, IEnumerable< string > fields=null, bool? formatFields=null, string prefer=null, string culture=null, string select=null, string orderby=null, int? top=null, int? skip=null, bool? count=null, CancellationToken cancellationToken=default(CancellationToken))
 Returns the results listing associated with a search operation.
 
async Task< ODataValueContextOfIListOfEntryGetSearchResultsAsync (string searchResultsUri, CancellationToken cancellationToken=default)
 Get search results with uri.
 
async Task GetSearchResultsForEachAsync (Func< ODataValueContextOfIListOfEntry, Task< bool > > callback, string repoId, string searchToken, bool? groupByEntryType=null, bool? refresh=null, IEnumerable< string > fields=null, bool? formatFields=null, string prefer=null, string culture=null, string select=null, string orderby=null, int? top=null, int? skip=null, bool? count=null, int? maxPageSize=null, CancellationToken cancellationToken=default)
 Returns a collection of search results using paging. Page results are returned to the callback .
 
async Task< ODataValueContextOfIListOfEntryGetSearchResultsNextLinkAsync (string nextLink, int? maxPageSize=null, CancellationToken cancellationToken=default)
 Returns a collection of search results using a nextlink.
 
virtual async Task< OperationProgressGetSearchStatusAsync (string repoId, string searchToken, CancellationToken cancellationToken=default(CancellationToken))
 Returns the status of a search operation.
 
 SearchesClient (HttpClient httpClient)
 
async Task< OperationProgressWaitForSearchAsync (string repositoryId, string operationId, TimeSpan timeout, Action< OperationProgress > handleOperationProgress=null, OperationStatus expectedOperationStatus=OperationStatus.Completed, CancellationToken cancellationToken=default)
 Waits for search to have expected status until timeout.
 

Properties

bool ReadResponseAsString [get, set]
 

Member Function Documentation

◆ CancelOrCloseSearchAsync()

virtual async Task< ODataValueOfBoolean > CancelOrCloseSearchAsync ( string  repoId,
string  searchToken,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinevirtual

Cancels or closes a search operation.

  • Cancels a currently running search.
  • Closes a completed search.
  • Required OAuth scope: repository.Read
Parameters
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Cancel or closed search successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ CreateSearchOperationAsync()

virtual async Task< AcceptedOperation > CreateSearchOperationAsync ( string  repoId,
AdvancedSearchRequest  request = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinevirtual

Runs a search in the specified repository.

  • Runs a search operation on the repository.
  • The status for search operations must be checked via the Search specific status checking route.
  • For datetime search criteria that relate to time zone like CreateDate and ModifiedDate, the value should be in UTC time.
  • Optional body parameters: FuzzyType: (default none), which can be used to determine what is considered a match by number of letters or percentage. FuzzyFactor: integer value that determines the degree to which a search will be considered a match (integer value for NumberOfLetters, or int value representing a percentage).
  • Required OAuth scope: repository.Read
Parameters
repoIdThe requested repository ID.
requestThe Laserfiche search command to run, optionally include fuzzy search settings.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Search operation start successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchContextHitsAsync()

virtual async Task< ODataValueContextOfIListOfContextHit > GetSearchContextHitsAsync ( string  repoId,
string  searchToken,
int  rowNumber,
string  prefer = null,
string  select = null,
string  orderby = null,
int?  top = null,
int?  skip = null,
bool?  count = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinevirtual

Returns the context hits associated with a search result entry.

  • Returns the context hits associated with a search result entry.
  • Given a searchToken, and rowNumber associated with a search entry in the listing, return the context hits for that entry.
  • Default page size: 100. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer.
  • Required OAuth scope: repository.Read
Parameters
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
rowNumberThe search result listing row number to get context hits for.
preferAn optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
selectLimits the properties returned in the result.
orderbySpecifies the order in which items are returned. The maximum number of expressions is 5.
topLimits the number of items returned from a collection. The maximum value is 150.
skipExcludes the specified number of items of the queried collection from the result.
countIndicates whether the total count of items within a collection are returned in the result.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Get search context hits successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchContextHitsForEachAsync()

async Task GetSearchContextHitsForEachAsync ( Func< ODataValueContextOfIListOfContextHit, Task< bool > >  callback,
string  repoId,
string  searchToken,
int  rowNumber,
string  prefer = null,
string  select = null,
string  orderby = null,
int?  top = null,
int?  skip = null,
bool?  count = null,
int?  maxPageSize = null,
CancellationToken  cancellationToken = default 
)
inline

Returns the context hits associated with a search result entry using paging. Page results are returned to the callback .

Parameters
callbackA delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
rowNumberThe search result listing row number to get context hits for.
preferAn optional OData header. Can be used to set the maximum page size using odata.maxpagesize.
selectLimits the properties returned in the result.
orderbySpecifies the order in which items are returned. The maximum number of expressions is 5.
topLimits the number of items returned from a collection.
skipExcludes the specified number of items of the queried collection from the result.
countIndicates whether the total count of items within a collection are returned in the result.
maxPageSizeOptionally specify the maximum number of items to retrieve.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchContextHitsNextLinkAsync()

async Task< ODataValueContextOfIListOfContextHit > GetSearchContextHitsNextLinkAsync ( string  nextLink,
int?  maxPageSize = null,
CancellationToken  cancellationToken = default 
)
inline

Returns the context hits associated with a search result entry using a nextlink.

Parameters
nextLinkA url that allows retrieving the next subset of the requested collection.
maxPageSizeOptionally specify the maximum number of items to retrieve.
cancellationTokenOptional cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Get search context hits successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchResultsAsync() [1/2]

virtual async Task< ODataValueContextOfIListOfEntry > GetSearchResultsAsync ( string  repoId,
string  searchToken,
bool?  groupByEntryType = null,
bool?  refresh = null,
IEnumerable< string >  fields = null,
bool?  formatFields = null,
string  prefer = null,
string  culture = null,
string  select = null,
string  orderby = null,
int?  top = null,
int?  skip = null,
bool?  count = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinevirtual

Returns the results listing associated with a search operation.

  • Returns a search result listing if the search is completed.
  • Search results expire after 5 minutes, but can be refreshed by retrieving the results again.
  • Optional query parameter: groupByOrderType (default false). This query parameter decides whether or not results are returned in groups based on their entry type.
  • Optional query parameter: refresh (default false). If the search listing should be refreshed to show updated values.
  • Optionally returns field values for the entries in the folder. Each field name needs to be specified in the request. Maximum limit of 10 field names. If field values are requested, only the first value is returned if it is a multi value field. The remaining field values can be retrieved via the GET fields route. Null or Empty field values should not be used to determine if a field is assigned to the entry.
  • Default page size: 150. Allowed OData query options: Select | Count | OrderBy | Skip | Top | SkipToken | Prefer. OData $OrderBy syntax should follow: "PropertyName direction,PropertyName2 direction". sort order can be either "asc" or "desc".
  • When OData Select query option is used, 'entryType' is always included in the result.
  • Required OAuth scope: repository.Read
Parameters
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
groupByEntryTypeAn optional query parameter used to indicate if the result should be grouped by entry type or not.
refreshIf the search listing should be refreshed to show updated values.
fieldsOptional array of field names. Field values corresponding to the given field names will be returned for each search result.
formatFieldsBoolean for if field values should be formatted. Only applicable if Fields are specified.
preferAn optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
cultureAn optional query parameter used to indicate the locale that should be used for formatting. The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise culture will not be used for formatting.
selectLimits the properties returned in the result.
orderbySpecifies the order in which items are returned. The maximum number of expressions is 5.
topLimits the number of items returned from a collection. The maximum value is 150.
skipExcludes the specified number of items of the queried collection from the result.
countIndicates whether the total count of items within a collection are returned in the result.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Get search result successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchResultsAsync() [2/2]

async Task< ODataValueContextOfIListOfEntry > GetSearchResultsAsync ( string  searchResultsUri,
CancellationToken  cancellationToken = default 
)
inline

Get search results with uri.

Parameters
searchResultsUriUri string.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Get entry successfully.

Implements ISearchesClient.

◆ GetSearchResultsForEachAsync()

async Task GetSearchResultsForEachAsync ( Func< ODataValueContextOfIListOfEntry, Task< bool > >  callback,
string  repoId,
string  searchToken,
bool?  groupByEntryType = null,
bool?  refresh = null,
IEnumerable< string >  fields = null,
bool?  formatFields = null,
string  prefer = null,
string  culture = null,
string  select = null,
string  orderby = null,
int?  top = null,
int?  skip = null,
bool?  count = null,
int?  maxPageSize = null,
CancellationToken  cancellationToken = default 
)
inline

Returns a collection of search results using paging. Page results are returned to the callback .

Parameters
callbackA delegate that will be called each time new data is retrieved. Returns false to stop receiving more data; returns true to be called again if there's more data.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
groupByEntryTypeAn optional query parameter used to indicate if the result should be grouped by entry type or not.
refreshIf the search listing should be refreshed to show updated values.
fieldsOptional array of field names. Field values corresponding to the given field names will be returned for each search result.
formatFieldsBoolean for if field values should be formatted. Only applicable if Fields are specified.
preferAn optional odata header. Can be used to set the maximum page size using odata.maxpagesize.
cultureAn optional query parameter used to indicate the locale that should be used for formatting.
The value should be a standard language tag. The formatFields query parameter must be set to true, otherwise
culture will not be used for formatting.
selectLimits the properties returned in the result.
orderbySpecifies the order in which items are returned. The maximum number of expressions is 5.
topLimits the number of items returned from a collection.
skipExcludes the specified number of items of the queried collection from the result.
countIndicates whether the total count of items within a collection are returned in the result.
maxPageSizeOptionally specify the maximum number of items to retrieve.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchResultsNextLinkAsync()

async Task< ODataValueContextOfIListOfEntry > GetSearchResultsNextLinkAsync ( string  nextLink,
int?  maxPageSize = null,
CancellationToken  cancellationToken = default 
)
inline

Returns a collection of search results using a nextlink.

Parameters
nextLinkA url that allows retrieving the next subset of the requested collection.
maxPageSizeOptionally specify the maximum number of items to retrieve.
cancellationTokenOptional cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Get search result successfully.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ GetSearchStatusAsync()

virtual async Task< OperationProgress > GetSearchStatusAsync ( string  repoId,
string  searchToken,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinevirtual

Returns the status of a search operation.

  • Returns search status.
  • Provide a token (returned in the create search asynchronous route), and get the search status, progress, and any errors that may have occurred. When the search is completed, the Location header can be inspected as a link to the search results.
  • OperationStatus can be one of the following : NotStarted, InProgress, Completed, Failed, or Canceled.
  • Required OAuth scope: repository.Read
Parameters
repoIdThe requested repository ID.
searchTokenThe requested searchToken.
cancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
Search has failed. Check the errors property to find out why.
Exceptions
ApiExceptionA server side error occurred.

Implements ISearchesClient.

◆ WaitForSearchAsync()

async Task< OperationProgress > WaitForSearchAsync ( string  repositoryId,
string  operationId,
TimeSpan  timeout,
Action< OperationProgress handleOperationProgress = null,
OperationStatus  expectedOperationStatus = OperationStatus.Completed,
CancellationToken  cancellationToken = default 
)
inline

Waits for search to have expected status until timeout.

Parameters
repositoryIdRepository Id
operationIdOperation Id
timeoutTime to wait for operation to reach expected status
handleOperationProgressAction called for each task progress
expectedOperationStatusExpected OperationStatus, defaults to OperationStatus.Completed.
cancellationTokenOptional cancellation token
Returns

Implements ISearchesClient.


The documentation for this class was generated from the following files: