Package ai.velr
Class VectorEmbeddingField
java.lang.Object
ai.velr.VectorEmbeddingField
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 Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Return raw text or blob storage bytes when available.display()Return the display rendering suitable for text embedders.name()Return the property name for indexed entity values.Return the underlying storage kind used for exact reconstruction.value()Java rendering of the value.Return the canonical JSON rendering of the Velr value.Return the typed Velr value kind.Return the typed Velr property value.
-
Method Details
-
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
Return the typed Velr value kind.- Returns:
- value kind
-
storageType
Return the underlying storage kind used for exact reconstruction.- Returns:
- storage kind
-
velrValue
Return the typed Velr property value.- Returns:
- Velr value
-
value
Java rendering of the value.Simple values are returned as
null,Boolean,Long,Double,String, orbyte[]. Rich Velr values such as temporal, spatial, list, and vector values are returned as their canonical JSON string; usevalueJson()andvalueType()when preserving the exact Velr type matters.- Returns:
- Java-native value or canonical JSON text
-
valueJson
Return the canonical JSON rendering of the Velr value.- Returns:
- canonical JSON text
-
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
-