Pinecone TypeScript SDK - v9.0.0
    Preparing search index...

    Interface LegacyCreateIndexOptions

    Use schema and deployment for new code.

    interface LegacyCreateIndexOptions {
        cmekId?: string;
        deletionProtection?: DeletionProtection;
        deployment?: undefined;
        dimension?: number;
        metric?: "cosine" | "euclidean" | "dotproduct";
        name: string;
        readCapacity?: ReadCapacity | CreateIndexReadCapacity;
        schema?: undefined;
        spec: LegacyCreateIndexSpec;
        suppressConflicts?: boolean;
        tags?: { [key: string]: string } | null;
        timeout?: number;
        vectorType?: "dense" | "sparse";
        waitUntilReady?: boolean;
    }

    Hierarchy

    • Omit<
          NativeCreateIndexOptions,
          | "schema"
          | "deployment"
          | "dimension"
          | "metric"
          | "vectorType"
          | "spec"
          | "readCapacity",
      >
      • LegacyCreateIndexOptions
    Index
    cmekId?: string

    The ID of a customer-managed encryption key (CMEK) to use for this index. Requires CMEK to be enabled for your organization. Encrypted indexes cannot have full_text_search fields: a request that sets cmek_id and declares one is rejected, and a project that enforces CMEK rejects any schema with a full_text_search field with 412.

    CreateIndexRequest

    deletionProtection?: DeletionProtection

    Whether to enable deletion protection. Defaults to disabled.

    deployment?: undefined

    Legacy and schema-based options cannot be combined.

    dimension?: number

    Use a dense vector schema field.

    metric?: "cosine" | "euclidean" | "dotproduct"

    Use the metric on the dense vector schema field.

    name: string

    The name of the index to create. Must be unique within the project.

    Read capacity overrides the capacity provided in spec.

    schema?: undefined

    Legacy and schema-based options cannot be combined.

    Use deployment.

    suppressConflicts?: boolean

    When true, returns undefined instead of throwing if an index with this name already exists. Otherwise creation always returns an index model, regardless of waitUntilReady.

    tags?: { [key: string]: string } | null

    Custom user tags added to an index, at most 20 per index. Keys must be 80 characters or less and alphanumeric, '_', or '-'. Values must be 120 characters or less and consist of printable ASCII characters or spaces. To unset a key, set the value to be an empty string. null in responses when the index has no tags.

    CreateIndexRequest

    timeout?: number

    Maximum time in milliseconds to wait for the index to become ready when waitUntilReady is true. Omit to poll indefinitely. Throws Errors.PineconeTimeoutError if the deadline is exceeded.

    vectorType?: "dense" | "sparse"

    Use a dense or sparse vector schema field.

    waitUntilReady?: boolean

    When true, polls until the index is ready before returning.