Variable vectorIndexConst

vectorIndex: {
    dynamic: ((opts?) => ModuleConfig<"dynamic", undefined | {
        distance?: VectorDistance;
        flat?: {
            distance?: VectorDistance;
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            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;
            multiVector?: {
                aggregation?: string;
                encoding?: {
                    dprojections?: ...;
                    ksim?: ...;
                    repetitions?: ...;
                    type?: ...;
                } | {};
            };
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        };
        threshold?: number;
        type?: "dynamic";
    }>);
    flat: ((opts?) => ModuleConfig<"flat", undefined | {
        distance?: VectorDistance;
        quantizer?: {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        } | {
            bits?: number;
            rescoreLimit?: number;
            type?: "rq";
        };
        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;
        multiVector?: {
            aggregation?: string;
            encoding?: {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            } | {};
        };
        quantizer?: {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        } | {
            bits?: number;
            rescoreLimit?: number;
            type?: "rq";
        };
        skip?: boolean;
        type?: "hnsw";
        vectorCacheMaxObjects?: number;
    }>);
    multiVector: {
        encoding: {
            muvera: ((options?) => {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            });
        };
        multiVector: ((options?) => MultiVectorConfigCreate);
    };
    quantizer: {
        bq: ((options?) => QuantizerRecursivePartial<BQConfig>);
        pq: ((options?) => QuantizerRecursivePartial<PQConfig>);
        rq: ((options?) => QuantizerRecursivePartial<RQConfig>);
        sq: ((options?) => QuantizerRecursivePartial<SQConfig>);
    };
} = ...

Type declaration

  • dynamic: ((opts?) => ModuleConfig<"dynamic", undefined | {
        distance?: VectorDistance;
        flat?: {
            distance?: VectorDistance;
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            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;
            multiVector?: {
                aggregation?: string;
                encoding?: {
                    dprojections?: ...;
                    ksim?: ...;
                    repetitions?: ...;
                    type?: ...;
                } | {};
            };
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: ...;
                    type?: ...;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            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.vectors method.

    Returns

    The configuration object.

      • (opts?): ModuleConfig<"dynamic", undefined | {
            distance?: VectorDistance;
            flat?: {
                distance?: VectorDistance;
                quantizer?: {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                } | {
                    bits?: number;
                    rescoreLimit?: number;
                    type?: "rq";
                };
                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;
                multiVector?: {
                    aggregation?: string;
                    encoding?: {
                        dprojections?: ...;
                        ksim?: ...;
                        repetitions?: ...;
                        type?: ...;
                    } | {};
                };
                quantizer?: {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                } | {
                    bits?: number;
                    rescoreLimit?: number;
                    type?: "rq";
                };
                skip?: boolean;
                type?: "hnsw";
                vectorCacheMaxObjects?: number;
            };
            threshold?: number;
            type?: "dynamic";
        }>
      • Parameters

        Returns ModuleConfig<"dynamic", undefined | {
            distance?: VectorDistance;
            flat?: {
                distance?: VectorDistance;
                quantizer?: {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                } | {
                    bits?: number;
                    rescoreLimit?: number;
                    type?: "rq";
                };
                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;
                multiVector?: {
                    aggregation?: string;
                    encoding?: {
                        dprojections?: ...;
                        ksim?: ...;
                        repetitions?: ...;
                        type?: ...;
                    } | {};
                };
                quantizer?: {
                    bitCompression?: boolean;
                    centroids?: number;
                    encoder?: {
                        distribution?: ...;
                        type?: ...;
                    };
                    segments?: number;
                    trainingLimit?: number;
                    type?: "pq";
                } | {
                    cache?: boolean;
                    rescoreLimit?: number;
                    type?: "bq";
                } | {
                    rescoreLimit?: number;
                    trainingLimit?: number;
                    type?: "sq";
                } | {
                    bits?: number;
                    rescoreLimit?: number;
                    type?: "rq";
                };
                skip?: boolean;
                type?: "hnsw";
                vectorCacheMaxObjects?: number;
            };
            threshold?: number;
            type?: "dynamic";
        }>

  • flat: ((opts?) => ModuleConfig<"flat", undefined | {
        distance?: VectorDistance;
        quantizer?: {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        } | {
            bits?: number;
            rescoreLimit?: number;
            type?: "rq";
        };
        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.vectors method.

    Returns

    The configuration object.

      • (opts?): ModuleConfig<"flat", undefined | {
            distance?: VectorDistance;
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            type?: "flat";
            vectorCacheMaxObjects?: number;
        }>
      • Parameters

        Returns ModuleConfig<"flat", undefined | {
            distance?: VectorDistance;
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            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;
        multiVector?: {
            aggregation?: string;
            encoding?: {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            } | {};
        };
        quantizer?: {
            bitCompression?: boolean;
            centroids?: number;
            encoder?: {
                distribution?: PQEncoderDistribution;
                type?: PQEncoderType;
            };
            segments?: number;
            trainingLimit?: number;
            type?: "pq";
        } | {
            cache?: boolean;
            rescoreLimit?: number;
            type?: "bq";
        } | {
            rescoreLimit?: number;
            trainingLimit?: number;
            type?: "sq";
        } | {
            bits?: number;
            rescoreLimit?: number;
            type?: "rq";
        };
        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.vectors 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;
            multiVector?: {
                aggregation?: string;
                encoding?: {
                    dprojections?: number;
                    ksim?: number;
                    repetitions?: number;
                    type?: "muvera";
                } | {};
            };
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            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;
            multiVector?: {
                aggregation?: string;
                encoding?: {
                    dprojections?: number;
                    ksim?: number;
                    repetitions?: number;
                    type?: "muvera";
                } | {};
            };
            quantizer?: {
                bitCompression?: boolean;
                centroids?: number;
                encoder?: {
                    distribution?: PQEncoderDistribution;
                    type?: PQEncoderType;
                };
                segments?: number;
                trainingLimit?: number;
                type?: "pq";
            } | {
                cache?: boolean;
                rescoreLimit?: number;
                type?: "bq";
            } | {
                rescoreLimit?: number;
                trainingLimit?: number;
                type?: "sq";
            } | {
                bits?: number;
                rescoreLimit?: number;
                type?: "rq";
            };
            skip?: boolean;
            type?: "hnsw";
            vectorCacheMaxObjects?: number;
        }>

  • multiVector: {
        encoding: {
            muvera: ((options?) => {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            });
        };
        multiVector: ((options?) => MultiVectorConfigCreate);
    }

    Define the configuration for a multi-vector index.

    • encoding: {
          muvera: ((options?) => {
              dprojections?: number;
              ksim?: number;
              repetitions?: number;
              type?: "muvera";
          });
      }

      Specify the encoding configuration for a multi-vector index.

      • muvera: ((options?) => {
            dprojections?: number;
            ksim?: number;
            repetitions?: number;
            type?: "muvera";
        })

        Create an object of type MuveraEncodingConfigCreate to be used when defining the encoding configuration of a multi-vector index using MUVERA.

        Returns

        The object of type MuveraEncodingConfigCreate.

          • (options?): {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            }
          • Parameters

            • Optional options: {
                  dprojections?: number;
                  ksim?: number;
                  repetitions?: number;
              }
              • Optional dprojections?: number

                The number of projections to use. Default is undefined.

              • Optional ksim?: number

                The number of nearest neighbors to consider for similarity. Default is undefined.

              • Optional repetitions?: number

                The number of repetitions to use. Default is undefined.

            Returns {
                dprojections?: number;
                ksim?: number;
                repetitions?: number;
                type?: "muvera";
            }

            • Optional dprojections?: number
            • Optional ksim?: number
            • Optional repetitions?: number
            • Optional type?: "muvera"
    • multiVector: ((options?) => MultiVectorConfigCreate)

      Create an object of type MultiVectorConfigCreate to be used when defining the configuration of a multi-vector index.

      Returns

      The object of type MultiVectorConfigCreate.

        • (options?): MultiVectorConfigCreate
        • Parameters

          • Optional options: {
                aggregation?: string;
                encoding?: {
                    dprojections?: number;
                    ksim?: number;
                    repetitions?: number;
                    type?: "muvera";
                };
            }
            • Optional aggregation?: string

              The aggregation method to use. Default is 'maxSim'.

            • Optional encoding?: {
                  dprojections?: number;
                  ksim?: number;
                  repetitions?: number;
                  type?: "muvera";
              }

              The encoding configuration for the multi-vector index. Default is undefined.

              • Optional dprojections?: number
              • Optional ksim?: number
              • Optional repetitions?: number
              • Optional type?: "muvera"

          Returns MultiVectorConfigCreate

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

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

    • bq: ((options?) => QuantizerRecursivePartial<BQConfig>)

      Create an object of type BQConfigCreate to be used when defining the quantizer configuration of a vector index.

      Returns

      The object of type BQConfigCreate.

    • pq: ((options?) => QuantizerRecursivePartial<PQConfig>)

      Create an object of type PQConfigCreate to be used when defining the quantizer configuration of a vector index.

      Returns

      The object of type PQConfigCreate.

    • rq: ((options?) => QuantizerRecursivePartial<RQConfig>)

      Create an object of type RQConfigCreate to be used when defining the quantizer configuration of a vector index.

      Returns

      The object of type RQConfigCreate.

    • sq: ((options?) => QuantizerRecursivePartial<SQConfig>)

      Create an object of type SQConfigCreate to be used when defining the quantizer configuration of a vector index.

      Returns

      The object of type SQConfigCreate.