interface ISearchesClient {
    cancelOrCloseSearch(args: {
        repoId: string;
        searchToken: string;
    }): Promise<ODataValueOfBoolean>;
    createSearchOperation(args: {
        repoId: string;
        request?: AdvancedSearchRequest;
    }): Promise<AcceptedOperation>;
    getSearchContextHits(args: {
        count?: boolean;
        orderby?: null | string;
        prefer?: null | string;
        repoId: string;
        rowNumber: number;
        searchToken: string;
        select?: null | string;
        skip?: number;
        top?: number;
    }): Promise<ODataValueContextOfIListOfContextHit>;
    getSearchContextHitsForEach(args: {
        callback: ((response: ODataValueContextOfIListOfContextHit) => Promise<boolean>);
        count?: boolean;
        maxPageSize?: number;
        orderby?: string;
        prefer?: string;
        repoId: string;
        rowNumber: number;
        searchToken: string;
        select?: string;
        skip?: number;
        top?: number;
    }): Promise<void>;
    getSearchContextHitsNextLink(args: {
        maxPageSize?: number;
        nextLink: string;
    }): Promise<ODataValueContextOfIListOfContextHit>;
    getSearchResults(args: {
        count?: boolean;
        culture?: null | string;
        fields?: null | string[];
        formatFields?: boolean;
        groupByEntryType?: boolean;
        orderby?: null | string;
        prefer?: null | string;
        refresh?: boolean;
        repoId: string;
        searchToken: string;
        select?: null | string;
        skip?: number;
        top?: number;
    }): Promise<ODataValueContextOfIListOfEntry>;
    getSearchResultsForEach(args: {
        callback: ((response: ODataValueContextOfIListOfEntry) => Promise<boolean>);
        count?: boolean;
        culture?: string;
        fields?: string[];
        formatFields?: boolean;
        groupByEntryType?: boolean;
        maxPageSize?: number;
        orderby?: string;
        prefer?: string;
        refresh?: boolean;
        repoId: string;
        searchToken: string;
        select?: string;
        skip?: number;
        top?: number;
    }): Promise<void>;
    getSearchResultsNextLink(args: {
        maxPageSize?: number;
        nextLink: string;
    }): Promise<ODataValueContextOfIListOfEntry>;
    getSearchStatus(args: {
        repoId: string;
        searchToken: string;
    }): Promise<OperationProgress>;
}

Implemented by

Methods

    • Runs a search operation on the repository.
    • 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). The status for search operations must be checked via the Search specific status checking route.

    Parameters

    • args: {
          repoId: string;
          request?: AdvancedSearchRequest;
      }
      • repoId: string

        The requested repository ID.

      • Optionalrequest?: AdvancedSearchRequest

        (optional) The Laserfiche search command to run, optionally include fuzzy search settings.

    Returns Promise<AcceptedOperation>

    Search operation start successfully.

    • 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.

    Parameters

    • args: {
          count?: boolean;
          orderby?: null | string;
          prefer?: null | string;
          repoId: string;
          rowNumber: number;
          searchToken: string;
          select?: null | string;
          skip?: number;
          top?: number;
      }
      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalorderby?: null | string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: null | string

        (optional) An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.

      • repoId: string

        The requested repository ID.

      • rowNumber: number

        The search result listing row number to get context hits for.

      • searchToken: string

        The requested searchToken.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection.

    Returns Promise<ODataValueContextOfIListOfContextHit>

    Get search context hits successfully.

  • It will continue to make the same call to get a list of search context hits of a fixed size (i.e. maxpagesize) until it reaches the last page (i.e. when next link is null/undefined) or whenever the callback function returns false.

    Parameters

    • args: {
          callback: ((response: ODataValueContextOfIListOfContextHit) => Promise<boolean>);
          count?: boolean;
          maxPageSize?: number;
          orderby?: string;
          prefer?: string;
          repoId: string;
          rowNumber: number;
          searchToken: string;
          select?: string;
          skip?: number;
          top?: number;
      }
      • callback: ((response: ODataValueContextOfIListOfContextHit) => Promise<boolean>)

        async callback function that will accept the current page results and return a boolean value to either continue or stop paging.

      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • OptionalmaxPageSize?: number

        (optional) the maximum page size or number of search context hits allowed per API response schema.

      • Optionalorderby?: string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: string

        (optional) An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.

      • repoId: string

        The requested repository ID.

      • rowNumber: number

        The search result listing row number to get context hits for.

      • searchToken: string

        The requested searchToken.

      • Optionalselect?: string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection.

    Returns Promise<void>

  • Returns the context hits associated with a search result entry using a next link

    Parameters

    • args: {
          maxPageSize?: number;
          nextLink: string;
      }
      • OptionalmaxPageSize?: number

        (optional) the maximum page size or number of search context hits allowed per API response schema

      • nextLink: string

        a url that allows retrieving the next subset of the requested collection

    Returns Promise<ODataValueContextOfIListOfContextHit>

    Get search context hits with the next link successfully

    • Returns a search result listing if the search is completed.
    • 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.
    • 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". Search results expire after 5 minutes, but can be refreshed by retrieving the results again.
    • Optionally returns field values for the entries in the search result listing. 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.
    • Null or Empty field values should not be used to determine if a field is assigned to the entry.

    Parameters

    • args: {
          count?: boolean;
          culture?: null | string;
          fields?: null | string[];
          formatFields?: boolean;
          groupByEntryType?: boolean;
          orderby?: null | string;
          prefer?: null | string;
          refresh?: boolean;
          repoId: string;
          searchToken: string;
          select?: null | string;
          skip?: number;
          top?: number;
      }
      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalculture?: null | string

        (optional) An 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.

      • Optionalfields?: null | string[]

        (optional) Optional array of field names. Field values corresponding to the given field names will be returned for each search result.

      • OptionalformatFields?: boolean

        (optional) Boolean for if field values should be formatted. Only applicable if Fields are specified.

      • OptionalgroupByEntryType?: boolean

        (optional) An optional query parameter used to indicate if the result should be grouped by entry type or not.

      • Optionalorderby?: null | string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: null | string

        (optional) An optional odata header. Can be used to set the maximum page size using odata.maxpagesize.

      • Optionalrefresh?: boolean

        (optional) If the search listing should be refreshed to show updated values.

      • repoId: string

        The requested repository ID.

      • searchToken: string

        The requested searchToken.

      • Optionalselect?: null | string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection.

    Returns Promise<ODataValueContextOfIListOfEntry>

    Get search result successfully.

  • It will continue to make the same call to get a list of search results of a fixed size (i.e. maxpagesize) until it reaches the last page (i.e. when next link is null/undefined) or whenever the callback function returns false.

    Parameters

    • args: {
          callback: ((response: ODataValueContextOfIListOfEntry) => Promise<boolean>);
          count?: boolean;
          culture?: string;
          fields?: string[];
          formatFields?: boolean;
          groupByEntryType?: boolean;
          maxPageSize?: number;
          orderby?: string;
          prefer?: string;
          refresh?: boolean;
          repoId: string;
          searchToken: string;
          select?: string;
          skip?: number;
          top?: number;
      }
      • callback: ((response: ODataValueContextOfIListOfEntry) => Promise<boolean>)

        async callback function that will accept the current page results and return a boolean value to either continue or stop paging.

      • Optionalcount?: boolean

        (optional) Indicates whether the total count of items within a collection are returned in the result.

      • Optionalculture?: string

        (optional) An 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.

      • Optionalfields?: string[]

        (optional) Optional array of field names. Field values corresponding to the given field names will be returned for each entry.

      • OptionalformatFields?: boolean

        (optional) Boolean for if field values should be formatted. Only applicable if Fields are specified.

      • OptionalgroupByEntryType?: boolean

        (optional) An optional query parameter used to indicate if the result should be grouped by entry type or not.

      • OptionalmaxPageSize?: number

        (optional) the maximum page size or number of search results allowed per API response schema.

      • Optionalorderby?: string

        (optional) Specifies the order in which items are returned. The maximum number of expressions is 5.

      • Optionalprefer?: string

        (optional) An optional OData header. Can be used to set the maximum page size using odata.maxpagesize.

      • Optionalrefresh?: boolean

        (optional) If the search listing should be refreshed to show updated values.

      • repoId: string

        The requested repository ID.

      • searchToken: string

        The requested searchToken.

      • Optionalselect?: string

        (optional) Limits the properties returned in the result.

      • Optionalskip?: number

        (optional) Excludes the specified number of items of the queried collection from the result.

      • Optionaltop?: number

        (optional) Limits the number of items returned from a collection.

    Returns Promise<void>

  • Returns a search result listing if the search is completed using a next link

    Parameters

    • args: {
          maxPageSize?: number;
          nextLink: string;
      }
      • OptionalmaxPageSize?: number

        (optional) the maximum page size or number of search results allowed per API response schema

      • nextLink: string

        a url that allows retrieving the next subset of the requested collection

    Returns Promise<ODataValueContextOfIListOfEntry>

    Get search result with the next link successfully

    • 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.

    Parameters

    • args: {
          repoId: string;
          searchToken: string;
      }
      • repoId: string

        The requested repository ID.

      • searchToken: string

        The requested searchToken.

    Returns Promise<OperationProgress>

    Search has failed. Check the errors property to find out why.