Class DenseVectorIndexOptions.Builder

All Implemented Interfaces:
WithJson<DenseVectorIndexOptions.Builder>, ObjectBuilder<DenseVectorIndexOptions>
Enclosing class:
DenseVectorIndexOptions

public static class DenseVectorIndexOptions.Builder extends WithJsonObjectBuilderBase<DenseVectorIndexOptions.Builder> implements ObjectBuilder<DenseVectorIndexOptions>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • confidenceInterval

      public final DenseVectorIndexOptions.Builder confidenceInterval(@Nullable Float value)
      The confidence interval to use when quantizing the vectors. Can be any value between and including 0.90 and 1.0 or exactly 0. When the value is 0, this indicates that dynamic quantiles should be calculated for optimized quantization. When between 0.90 and 1.0, this value restricts the values used when calculating the quantization thresholds.

      For example, a value of 0.95 will only use the middle 95% of the values when calculating the quantization thresholds (e.g. the highest and lowest 2.5% of values will be ignored).

      Defaults to 1/(dims + 1) for int8 quantized vectors and 0 for int4 for dynamic quantile calculation.

      Only applicable to int8_hnsw, int4_hnsw, int8_flat, and int4_flat index types.

      API name: confidence_interval

    • efConstruction

      public final DenseVectorIndexOptions.Builder efConstruction(@Nullable Integer value)
      The number of candidates to track while assembling the list of nearest neighbors for each new node.

      Only applicable to hnsw, int8_hnsw, bbq_hnsw, and int4_hnsw index types.

      API name: ef_construction

    • m

      public final DenseVectorIndexOptions.Builder m(@Nullable Integer value)
      The number of neighbors each node will be connected to in the HNSW graph.

      Only applicable to hnsw, int8_hnsw, bbq_hnsw, and int4_hnsw index types.

      API name: m

    • type

      Required - The type of kNN algorithm to use.

      API name: type

    • self

      Specified by:
      self in class WithJsonObjectBuilderBase<DenseVectorIndexOptions.Builder>
    • build

      public DenseVectorIndexOptions build()
      Specified by:
      build in interface ObjectBuilder<DenseVectorIndexOptions>
      Throws:
      NullPointerException - if some of the required fields are null.