Navigation
API > API/Plugins > API/Plugins/SemanticSearch
Abstract interface for vector similarity search indices.
| Name | IVectorIndex |
| Type | class |
| Header File | /Engine/Plugins/Experimental/SemanticSearch/Source/SemanticSearch/Public/Interfaces/IVectorIndex.h |
| Include Path | #include "Interfaces/IVectorIndex.h" |
Syntax
class IVectorIndex
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IVectorIndex() |
Interfaces/IVectorIndex.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Add
(
TConstArrayView< int64 > IDs, |
Add multiple vectors with corresponding IDs. Index must be trained first. | Interfaces/IVectorIndex.h | |
void Add
(
int64 ID, |
Interfaces/IVectorIndex.h | ||
int64 GetCount() |
Number of vectors currently in the index. | Interfaces/IVectorIndex.h | |
int32 GetDimension() |
Embedding dimension. | Interfaces/IVectorIndex.h | |
bool IsTrained() |
Whether the index has been trained and is ready for Add/Search. | Interfaces/IVectorIndex.h | |
void Remove
(
TConstArrayView< int64 > IDs |
Remove vectors by IDs. | Interfaces/IVectorIndex.h | |
bool Remove
(
int64 ID |
Interfaces/IVectorIndex.h | ||
void Search
(
TConstArrayView< float > QueryVector, |
Search for K nearest neighbors. | Interfaces/IVectorIndex.h | |
TArray< uint8 > Serialize() |
Serialize the full index to a byte array. | Interfaces/IVectorIndex.h | |
void Train
(
TConstArrayView< float > Vectors, |
Train the index on representative vectors. No-op for flat indices. | Interfaces/IVectorIndex.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool Contains
(
int64 ID |
Returns true if a vector with the given ID exists in the index. | Interfaces/IVectorIndex.h | |
virtual int64 EstimateMemoryBytes() |
Estimated memory usage in bytes. Returns 0 if not implemented. | Interfaces/IVectorIndex.h | |
virtual bool SupportsQuantization () |
Whether this index supports quantization. | Interfaces/IVectorIndex.h | |
virtual bool TryGetEmbedding
(
int64 ID, |
Retrieve the embedding for a given ID. Returns false if not supported or ID not found. | Interfaces/IVectorIndex.h | |
virtual bool Update
(
int64 OldID, |
Re-key a vector from OldID to NewID, preserving the embedding data. | Interfaces/IVectorIndex.h |