Class QdrantVectorIndex
- All Implemented Interfaces:
com.tnsai.memory.advanced.VectorIndex
VectorIndex.
Opens only when tnsai.vector.qdrant.url (or
TNSAI_VECTOR_QDRANT_URL) is set. The official Qdrant client is
never a required dependency: REST is spoken through QdrantTransport.
Bindings pass separate namespace and ownership scopes. Corpora with the
same configuration may share a physical collection, while each live
provider-created engine receives a lifecycle-unique point owner. Role-bound
owners remain deterministic so a restarted process still sees the previous
corpus. clear() removes only the scoped owner's active corpus,
scrubs its payload and vectors, and retains non-searchable fence records for
a bounded replay horizon so delayed remote writes cannot resurrect deleted
content. A later lease sweep physically reclaims those records. It never
drops the collection.
- Since:
- 0.14.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()static Optional<QdrantVectorIndex> static Optional<QdrantVectorIndex> configured(String scope) Opens a live HTTP index namespaced toscope.static booleanOpens a live HTTP index when a URL is configured.booleanstatic StringscopedCollection(String base, String scope) Collection name for a binding scope.List<com.tnsai.memory.advanced.ScoredEntry> searchByVector(float[] queryVector, int topK) intsize()void
-
Field Details
-
URL_PROPERTY
System property that enables the adapter.- See Also:
-
URL_ENV
Environment variable that enables the adapter.- See Also:
-
COLLECTION_PROPERTY
System property for the collection name.- See Also:
-
DEFAULT_COLLECTION
Default collection when none is configured.- See Also:
-
-
Constructor Details
-
QdrantVectorIndex
-
-
Method Details
-
isConfigured
public static boolean isConfigured()Opens a live HTTP index when a URL is configured.- Returns:
- empty when Qdrant is not configured
-
configured
-
configured
Opens a live HTTP index namespaced toscope.Literal public scopes retain deterministic namespace and owner derivation. Internal lifecycle-managed scopes may share a compatible physical collection while using distinct full-digest owners.
- Parameters:
scope- binding identity and source set, ornullfor the shared standalone collection- Returns:
- empty when Qdrant is not configured
-
scopedCollection
Collection name for a binding scope.- Parameters:
base- configured collection prefixscope- binding identity, or blank forbaseitself- Returns:
- Qdrant collection name
-
upsert
- Specified by:
upsertin interfacecom.tnsai.memory.advanced.VectorIndex
-
remove
- Specified by:
removein interfacecom.tnsai.memory.advanced.VectorIndex
-
clear
public void clear()- Specified by:
clearin interfacecom.tnsai.memory.advanced.VectorIndex
-
size
public int size()- Specified by:
sizein interfacecom.tnsai.memory.advanced.VectorIndex
-
searchByVector
- Specified by:
searchByVectorin interfacecom.tnsai.memory.advanced.VectorIndex
-