Variable vectorIndexConst

vectorIndex: {
    dynamic: ((opts?) => ModuleConfig<"dynamic", undefined | {
        distance?: VectorDistance;
        flat?: {
            distance?: VectorDistance;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            };
            type?: "flat";
            vectorCacheMaxObjects?: number;
        };
        hnsw?: {
            cleanupIntervalSeconds?: number;
            distance?: VectorDistance;
            dynamicEfFactor?: number;
            dynamicEfMax?: number;
            dynamicEfMin?: number;
            ef?: number;
            efConstruction?: number;
            filterStrategy?: VectorIndexFilterStrategy;
            flatSearchCutoff?: number;
            maxConnections?: number;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        };
        threshold?: number;
        type?: "dynamic";
    }>);
    flat: ((opts?) => ModuleConfig<"flat", undefined | {
        distance?: VectorDistance;
        quantizer?: {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        };
        type?: "flat";
        vectorCacheMaxObjects?: number;
    }>);
    hnsw: ((opts?) => ModuleConfig<"hnsw", undefined | {
        cleanupIntervalSeconds?: number;
        distance?: VectorDistance;
        dynamicEfFactor?: number;
        dynamicEfMax?: number;
        dynamicEfMin?: number;
        ef?: number;
        efConstruction?: number;
        filterStrategy?: VectorIndexFilterStrategy;
        flatSearchCutoff?: number;
        maxConnections?: number;
        quantizer?: {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        };
        skip?: boolean;
        type?: "hnsw";
        vectorCacheMaxObjects?: number;
    }>);
    quantizer: {
        bq: ((options?) => QuantizerRecursivePartial<BQConfig>);
        pq: ((options?) => QuantizerRecursivePartial<PQConfig>);
        sq: ((options?) => QuantizerRecursivePartial<SQConfig>);
    };
} = ...

Type declaration

  • dynamic: ((opts?) => ModuleConfig<"dynamic", undefined | {
        distance?: VectorDistance;
        flat?: {
            distance?: VectorDistance;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            };
            type?: "flat";
            vectorCacheMaxObjects?: number;
        };
        hnsw?: {
            cleanupIntervalSeconds?: number;
            distance?: VectorDistance;
            dynamicEfFactor?: number;
            dynamicEfMax?: number;
            dynamicEfMin?: number;
            ef?: number;
            efConstruction?: number;
            filterStrategy?: VectorIndexFilterStrategy;
            flatSearchCutoff?: number;
            maxConnections?: number;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        };
        threshold?: number;
        type?: "dynamic";
    }>)

    Create a ModuleConfig<'dynamic', VectorIndexConfigDynamicCreate | undefined> object when defining the configuration of the dynamic vector index.

    Use this method when defining the options.vectorIndexConfig argument of the configure.vectorizer method.

    Returns

    The configuration object.

      • (opts?): ModuleConfig<"dynamic", undefined | {
            distance?: VectorDistance;
            flat?: {
                distance?: VectorDistance;
                quantizer?: {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                };
                type?: "flat";
                vectorCacheMaxObjects?: number;
            };
            hnsw?: {
                cleanupIntervalSeconds?: number;
                distance?: VectorDistance;
                dynamicEfFactor?: number;
                dynamicEfMax?: number;
                dynamicEfMin?: number;
                ef?: number;
                efConstruction?: number;
                filterStrategy?: VectorIndexFilterStrategy;
                flatSearchCutoff?: number;
                maxConnections?: number;
                quantizer?: {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                };
                skip?: boolean;
                type?: "hnsw";
                vectorCacheMaxObjects?: number;
            };
            threshold?: number;
            type?: "dynamic";
        }>
      • Parameters

        Returns ModuleConfig<"dynamic", undefined | {
            distance?: VectorDistance;
            flat?: {
                distance?: VectorDistance;
                quantizer?: {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                };
                type?: "flat";
                vectorCacheMaxObjects?: number;
            };
            hnsw?: {
                cleanupIntervalSeconds?: number;
                distance?: VectorDistance;
                dynamicEfFactor?: number;
                dynamicEfMax?: number;
                dynamicEfMin?: number;
                ef?: number;
                efConstruction?: number;
                filterStrategy?: VectorIndexFilterStrategy;
                flatSearchCutoff?: number;
                maxConnections?: number;
                quantizer?: {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                };
                skip?: boolean;
                type?: "hnsw";
                vectorCacheMaxObjects?: number;
            };
            threshold?: number;
            type?: "dynamic";
        }>

  • flat: ((opts?) => ModuleConfig<"flat", undefined | {
        distance?: VectorDistance;
        quantizer?: {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        };
        type?: "flat";
        vectorCacheMaxObjects?: number;
    }>)

    Create a ModuleConfig<'flat', VectorIndexConfigFlatCreate | undefined> object when defining the configuration of the FLAT vector index.

    Use this method when defining the options.vectorIndexConfig argument of the configure.vectorizer method.

    Returns

    The configuration object.

      • (opts?): ModuleConfig<"flat", undefined | {
            distance?: VectorDistance;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            };
            type?: "flat";
            vectorCacheMaxObjects?: number;
        }>
      • Parameters

        Returns ModuleConfig<"flat", undefined | {
            distance?: VectorDistance;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            };
            type?: "flat";
            vectorCacheMaxObjects?: number;
        }>

  • hnsw: ((opts?) => ModuleConfig<"hnsw", undefined | {
        cleanupIntervalSeconds?: number;
        distance?: VectorDistance;
        dynamicEfFactor?: number;
        dynamicEfMax?: number;
        dynamicEfMin?: number;
        ef?: number;
        efConstruction?: number;
        filterStrategy?: VectorIndexFilterStrategy;
        flatSearchCutoff?: number;
        maxConnections?: number;
        quantizer?: {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        };
        skip?: boolean;
        type?: "hnsw";
        vectorCacheMaxObjects?: number;
    }>)

    Create a ModuleConfig<'hnsw', VectorIndexConfigHNSWCreate | undefined> object when defining the configuration of the HNSW vector index.

    Use this method when defining the options.vectorIndexConfig argument of the configure.vectorizer method.

    Returns

    The configuration object.

      • (opts?): ModuleConfig<"hnsw", undefined | {
            cleanupIntervalSeconds?: number;
            distance?: VectorDistance;
            dynamicEfFactor?: number;
            dynamicEfMax?: number;
            dynamicEfMin?: number;
            ef?: number;
            efConstruction?: number;
            filterStrategy?: VectorIndexFilterStrategy;
            flatSearchCutoff?: number;
            maxConnections?: number;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        }>
      • Parameters

        Returns ModuleConfig<"hnsw", undefined | {
            cleanupIntervalSeconds?: number;
            distance?: VectorDistance;
            dynamicEfFactor?: number;
            dynamicEfMax?: number;
            dynamicEfMin?: number;
            ef?: number;
            efConstruction?: number;
            filterStrategy?: VectorIndexFilterStrategy;
            flatSearchCutoff?: number;
            maxConnections?: number;
            quantizer?: {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        }>

  • quantizer: {
        bq: ((options?) => QuantizerRecursivePartial<BQConfig>);
        pq: ((options?) => QuantizerRecursivePartial<PQConfig>);
        sq: ((options?) => QuantizerRecursivePartial<SQConfig>);
    }

    Define the quantizer configuration to use when creating a vector index.