Class HnswIndexParams


  • public class HnswIndexParams
    extends java.lang.Object
    Configuration parameters for a hnsw index used together with a 1-dimensional indexed tensor for approximate nearest neighbor search.
    Author:
    geirst
    • Field Detail

      • DEFAULT_MAX_LINKS_PER_NODE

        public static final int DEFAULT_MAX_LINKS_PER_NODE
        See Also:
        Constant Field Values
      • DEFAULT_NEIGHBORS_TO_EXPLORE_AT_INSERT

        public static final int DEFAULT_NEIGHBORS_TO_EXPLORE_AT_INSERT
        See Also:
        Constant Field Values
    • Constructor Detail

      • HnswIndexParams

        public HnswIndexParams()
      • HnswIndexParams

        public HnswIndexParams​(java.util.Optional<java.lang.Integer> maxLinksPerNode,
                               java.util.Optional<java.lang.Integer> neighborsToExploreAtInsert,
                               java.util.Optional<java.lang.Boolean> multiThreadedIndexing)
    • Method Detail

      • overrideFrom

        public HnswIndexParams overrideFrom​(java.util.Optional<HnswIndexParams> other)
        Creates a new instance where values from the given parameter instance are used where they are present, otherwise we use values from this.
      • maxLinksPerNode

        public int maxLinksPerNode()
      • neighborsToExploreAtInsert

        public int neighborsToExploreAtInsert()
      • multiThreadedIndexing

        public boolean multiThreadedIndexing()