dc-management-sdk-js
    Preparing search index...

    Class SearchIndex

    Class representing an Algolia Search Index.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _links?: Map<string, HalLink>
    createdDate?: string

    Timestamp representing when the Index was originally created.

    id?: string

    Unique id generated on creation.

    label?: string

    Friendly display label for index.

    lastModifiedDate?: string

    Timestamp representing when the Index was last updated.

    name?: string

    Generated index name including the hub name and user defined suffix.

    parentId?: string

    Id of the replicas parent index (only present on replica indexes).

    related: {
        assignedContentTypes: {
            create: (resource: AssignedContentType) => Promise<AssignedContentType>;
            get: (id: string) => Promise<AssignedContentType>;
            list: (
                options?: Pageable & Sortable,
            ) => Promise<Page<AssignedContentType>>;
        };
        clear: () => Promise<SearchIndex>;
        delete: () => Promise<void>;
        hub: () => Promise<Hub>;
        indexObject: { delete: (id: string) => Promise<void> };
        keys: { get: () => Promise<SearchIndexKey> };
        "no-results-rate": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexNoResultsRate>;
        };
        replicas: {
            list: (
                projection?: string,
                options?: Pageable & Sortable,
            ) => Promise<Page<SearchIndex>>;
        };
        "searches-count": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexSearchesCount>;
        };
        "searches-with-no-results": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    limit?: number;
                    offset?: number;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexSearchesWithNoResultsCollection>;
        };
        settings: {
            get: () => Promise<SearchIndexSettings>;
            update: (
                resource: SearchIndexSettings,
                forwardToReplicas?: boolean,
                options?: { waitUntilApplied: boolean | string[] },
            ) => Promise<SearchIndexSettings>;
        };
        stats: { get: (period?: string) => Promise<SearchIndexStatistics> };
        "top-filters-no-result-search": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    limit?: number;
                    offset?: number;
                    search: string;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexTopFiltersNoResultSearchCollection>;
        };
        "top-hits": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    limit?: number;
                    offset?: number;
                    search?: string;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexTopHitsCollection>;
        };
        "top-searches": {
            get: (
                __namedParameters: {
                    clickAnalytics?: boolean;
                    direction?: "asc" | "desc";
                    endDate?: string;
                    includeReplicas?: boolean;
                    limit?: number;
                    offset?: number;
                    orderBy?: SearchesOrderBy;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexTopSearchesCollection>;
        };
        update: (resource: SearchIndex) => Promise<SearchIndex>;
        "users-count": {
            get: (
                __namedParameters: {
                    endDate?: string;
                    includeReplicas?: boolean;
                    startDate?: string;
                    tags?: string;
                },
            ) => Promise<SearchIndexUsersCount>;
        };
    } = ...

    Resources and actions related to a Search Index.

    Type declaration

    • assignedContentTypes: {
          create: (resource: AssignedContentType) => Promise<AssignedContentType>;
          get: (id: string) => Promise<AssignedContentType>;
          list: (options?: Pageable & Sortable) => Promise<Page<AssignedContentType>>;
      }
    • clear: () => Promise<SearchIndex>
    • delete: () => Promise<void>
    • hub: () => Promise<Hub>

      Retrieves the Hub this search index is stored in

    • indexObject: { delete: (id: string) => Promise<void> }
    • keys: { get: () => Promise<SearchIndexKey> }
    • no-results-rate: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexNoResultsRate>;
      }
    • replicas: {
          list: (
              projection?: string,
              options?: Pageable & Sortable,
          ) => Promise<Page<SearchIndex>>;
      }
    • searches-count: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexSearchesCount>;
      }
    • searches-with-no-results: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  limit?: number;
                  offset?: number;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexSearchesWithNoResultsCollection>;
      }
    • settings: {
          get: () => Promise<SearchIndexSettings>;
          update: (
              resource: SearchIndexSettings,
              forwardToReplicas?: boolean,
              options?: { waitUntilApplied: boolean | string[] },
          ) => Promise<SearchIndexSettings>;
      }
    • stats: { get: (period?: string) => Promise<SearchIndexStatistics> }
    • top-filters-no-result-search: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  limit?: number;
                  offset?: number;
                  search: string;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexTopFiltersNoResultSearchCollection>;
      }
    • top-hits: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  limit?: number;
                  offset?: number;
                  search?: string;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexTopHitsCollection>;
      }
    • top-searches: {
          get: (
              __namedParameters: {
                  clickAnalytics?: boolean;
                  direction?: "asc" | "desc";
                  endDate?: string;
                  includeReplicas?: boolean;
                  limit?: number;
                  offset?: number;
                  orderBy?: SearchesOrderBy;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexTopSearchesCollection>;
      }
    • update: (resource: SearchIndex) => Promise<SearchIndex>
    • users-count: {
          get: (
              __namedParameters: {
                  endDate?: string;
                  includeReplicas?: boolean;
                  startDate?: string;
                  tags?: string;
              },
          ) => Promise<SearchIndexUsersCount>;
      }
    replicaCount?: number

    Number of replica indexes for this index (only present on non-replica indexes).

    suffix?: string

    User defined suffix used to uniquely name the index.

    type?: string

    Type of index.

    Methods

    • POST to an action endpoint with no resource response returned.

      Parameters

      • name: string
      • params: any
      • data: any
      • method: POST | PUT | PATCH = HttpMethod.POST

      Returns Promise<void>