Annotation Interface VectorIndex
@Retention(RUNTIME)
@Documented
@Target({TYPE,FIELD,METHOD,ANNOTATION_TYPE})
@Inherited
public @interface VectorIndex
Declares a vendor-specific vector index for a Micronaut Data vector property.
Applies to entity types and properties; supported dialects may ignore it.
- Since:
- 5.0.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionintTarget accuracy used by the vendor implementation (if applicable).Distance (similarity) metric to use for the vector index.Optional index name.Index algorithm to use for the vector index.
-
Element Details
-
name
String nameOptional index name. If empty, a name will be derived from table and column names.- Returns:
- the index name to use, or an empty string to let Micronaut derive one
- Default:
""
-
vectorIndexType
VectorIndexType vectorIndexTypeIndex algorithm to use for the vector index.- Returns:
- the vector index algorithm type
- Default:
IVF
-
distanceType
VectorIndexType.DistanceType distanceTypeDistance (similarity) metric to use for the vector index.- Returns:
- the distance metric for nearest-neighbor search
- Default:
COSINE
-
accuracy
int accuracyTarget accuracy used by the vendor implementation (if applicable). The value is interpreted by the database engine and may be ignored on unsupported dialects.- Returns:
- the target accuracy value (typically a percentage-like integer)
- Default:
90
-