/** * CyborgDB Service * REST API for CyborgDB: The Confidential Vector Database * * The version of the OpenAPI document: 0.17.1.dev16 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { MetadataFieldPolicy } from './MetadataFieldPolicy'; /** * Request model for creating a new encrypted DiskIVF index. * * Exactly one of `kms_name` / `index_key` must be supplied; supplying * both is rejected with 400. * * Attributes: * index_name: The name/identifier of the index. * kms_name: Name of a `kms.registry` entry in the service YAML. * When supplied (and `index_key` is omitted), the service * generates the KEK itself, wraps it under that entry's KMS, * and persists the envelope. * index_key: A 32-byte encryption key as a hex string. When * supplied (and `kms_name` is omitted), the SDK provides the * KEK directly and the persisted envelope records * `provider="none"`. * dimension (Optional[int]): Dimensionality of the vectors. Auto-detected * from the first upsert if omitted. * embedding_model (Optional[str]): Optional embedding model name. * metric (Optional[str]): Optional distance metric. * storage_precision (Optional[Literal["float32", "float16", "tq12", "tq8", "tq6", "tq4"]]): * On-disk rerank-vector format, chosen at create and immutable. * Defaults to float32 in core. "float16" halves storage at a small * precision cost. The TurboQuant tiers "tq12"/"tq8"/"tq6"/"tq4" * (12/8/6/4 bits per dim) trade storage for a small recall/latency * cost, with "tq4" the most aggressive (~8x smaller, ~94% recall@100). * All tiers work with every metric. * metadata_schema (Optional[Dict[str, MetadataFieldPolicy]]): Per-field * metadata indexing policy, keyed by field name (dot-path for * nested fields). Omitted fields are filterable by default * (opt-out posture). Fixed at create time and immutable. * text_fields (Optional[List[str]]): Shorthand for marking fields * `full_text=true` in `metadata_schema`. A field listed here is * analyzed by BM25 and becomes searchable by `query(text=...)` / * `query_metadata(text=...)`. Cannot name a field the schema * already sets `full_text=false`. * bm25_k1 (Optional[float]): BM25 term-frequency saturation (>= 0, * default 1.2 in core). Requires at least one full_text field. * bm25_b (Optional[float]): BM25 length-normalization strength * (in [0, 1], default 0.75 in core). Requires at least one * full_text field. * * BM25 full-text search is opt-in and derived, not flagged: an index * with at least one full_text field supports the `text=...` query legs; * an index with none writes no BM25 config at all. * @export * @interface CreateIndexRequest */ export interface CreateIndexRequest { /** * ID name * @type {string} * @memberof CreateIndexRequest */ indexName: string; /** * Name of a kms.registry entry in the service YAML. Mutually exclusive with index_key — when supplied, the service wraps a fresh KEK via that KMS and persists the envelope. * @type {string} * @memberof CreateIndexRequest */ kmsName?: string | null; /** * 32-byte encryption key as hex string. Mutually exclusive with kms_name — when supplied, the SDK provides the KEK directly and the index is persisted as `provider=none`. * @type {string} * @memberof CreateIndexRequest */ indexKey?: string | null; /** * * @type {number} * @memberof CreateIndexRequest */ dimension?: number | null; /** * * @type {string} * @memberof CreateIndexRequest */ embeddingModel?: string | null; /** * * @type {string} * @memberof CreateIndexRequest */ metric?: string | null; /** * * @type {CreateIndexRequestStoragePrecisionEnum} * @memberof CreateIndexRequest */ storagePrecision?: CreateIndexRequestStoragePrecisionEnum | null; /** * Per-field metadata indexing policy: {"field": {"filterable": true, "pattern": false, "full_text": false}}. `filterable` (default true) builds inverted-index postings so filters on the field resolve from the index; `pattern` (default false) also builds the field's regex dictionary, needed for index-resolved `$regex` / `$contains`; `full_text` (default false) routes the field through the BM25 analyzer to enable full-text search (implies `filterable: false`, and is incompatible with `pattern: true`). Fields not listed are filterable (opt-out posture). Immutable after create. * @type {{ [key: string]: MetadataFieldPolicy; }} * @memberof CreateIndexRequest */ metadataSchema?: { [key: string]: MetadataFieldPolicy; } | null; /** * Fields to index for BM25 full-text search — shorthand for marking them `full_text: true` in `metadata_schema`. Enables `query(text=...)` and `query_metadata(text=...)`. * @type {Array} * @memberof CreateIndexRequest */ textFields?: Array | null; /** * BM25 term-frequency saturation (>= 0, default 1.2). Requires at least one full_text field. * @type {number} * @memberof CreateIndexRequest */ bm25K1?: number | null; /** * BM25 length-normalization strength (in [0, 1], default 0.75). Requires at least one full_text field. * @type {number} * @memberof CreateIndexRequest */ bm25B?: number | null; } /** * @export */ export declare const CreateIndexRequestStoragePrecisionEnum: { readonly Float32: "float32"; readonly Float16: "float16"; readonly Tq12: "tq12"; readonly Tq8: "tq8"; readonly Tq6: "tq6"; readonly Tq4: "tq4"; }; export type CreateIndexRequestStoragePrecisionEnum = typeof CreateIndexRequestStoragePrecisionEnum[keyof typeof CreateIndexRequestStoragePrecisionEnum]; /** * Check if a given object implements the CreateIndexRequest interface. */ export declare function instanceOfCreateIndexRequest(value: object): value is CreateIndexRequest; export declare function CreateIndexRequestFromJSON(json: any): CreateIndexRequest; export declare function CreateIndexRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateIndexRequest; export declare function CreateIndexRequestToJSON(json: any): CreateIndexRequest; export declare function CreateIndexRequestToJSONTyped(value?: CreateIndexRequest | null, ignoreDiscriminator?: boolean): any;