Enum Class VectorShape

java.lang.Object
java.lang.Enum<VectorShape>
io.micronaut.data.annotation.VectorShape
All Implemented Interfaces:
Serializable, Comparable<VectorShape>, Constable

public enum VectorShape extends Enum<VectorShape>
Declares how vector values are physically represented for persistence and database operations.

Use this with VectorStorage.shape() to align mapping and index configuration with the capabilities of the target database.

See:

Since:
5.0.0
  • Enum Constant Details

    • DENSE

      public static final VectorShape DENSE
      Dense vectors store every dimension explicitly.
    • SPARSE

      public static final VectorShape SPARSE
      Sparse vectors store only non-zero dimensions with their positions.
  • Method Details

    • values

      public static VectorShape[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VectorShape valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isSparse

      public static boolean isSparse(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata)
      Resolves sparse storage intent from VectorStorage annotation metadata.
      Parameters:
      annotationMetadata - annotation metadata to inspect
      Returns:
      true when vector shape resolves to SPARSE, otherwise false