Package ai.velr

Class VectorEmbeddingField

java.lang.Object
ai.velr.VectorEmbeddingField

public final class VectorEmbeddingField extends Object
One Velr property value passed to a vector embedding callback.

The field exposes the same value through multiple renderings: typed VelrValue, a Java-native scalar object when available, canonical JSON, display text, and raw storage bytes.

  • Method Details

    • name

      public String name()
      Return the property name for indexed entity values.

      Query payloads may be unnamed.

      Returns:
      property name, or an empty/unnamed value for query payloads
    • valueType

      public VectorValueType valueType()
      Return the typed Velr value kind.
      Returns:
      value kind
    • storageType

      public VectorStorageType storageType()
      Return the underlying storage kind used for exact reconstruction.
      Returns:
      storage kind
    • velrValue

      public VelrValue velrValue()
      Return the typed Velr property value.
      Returns:
      Velr value
    • value

      public Object value()
      Java rendering of the value.

      Simple values are returned as null, Boolean, Long, Double, String, or byte[]. Rich Velr values such as temporal, spatial, list, and vector values are returned as their canonical JSON string; use valueJson() and valueType() when preserving the exact Velr type matters.

      Returns:
      Java-native value or canonical JSON text
    • valueJson

      public String valueJson()
      Return the canonical JSON rendering of the Velr value.
      Returns:
      canonical JSON text
    • display

      public String display()
      Return the display rendering suitable for text embedders.
      Returns:
      display text
    • bytes

      public byte[] bytes()
      Return raw text or blob storage bytes when available.
      Returns:
      storage bytes, or an empty array when the value has no byte-backed storage payload