Class: QdrantVectorStore
Qdrant vector store.
Implements
Constructors
new QdrantVectorStore()
new QdrantVectorStore(
__namedParameters
):QdrantVectorStore
Creates a new QdrantVectorStore.
Parameters
• __namedParameters: QdrantParams
Returns
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:53
Properties
batchSize
batchSize:
number
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:39
collectionInitialized
private
collectionInitialized:boolean
=false
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:43
collectionName
collectionName:
string
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:40
db
private
db:QdrantClient
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:42
storesText
storesText:
boolean
=true
Implementation of
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:37
Methods
add()
add(
embeddingResults
):Promise
<string
[]>
Adds the given nodes to the vector store.
Parameters
• embeddingResults: BaseNode
<Metadata
>[]
List of nodes
Returns
Promise
<string
[]>
List of node IDs
Implementation of
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:180
buildPoints()
buildPoints(
nodes
):Promise
<object
>
Builds a list of points from the given nodes.
Parameters
• nodes: BaseNode
<Metadata
>[]
Returns
Promise
<object
>
ids
ids:
string
[]
points
points:
PointStruct
[]
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:132
buildQueryFilter()
private
buildQueryFilter(query
):Promise
<null
|object
>
Qdrant filter builder
Parameters
• query: VectorStoreQuery
The VectorStoreQuery to be used
Returns
Promise
<null
| object
>
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:291
client()
client():
QdrantClient
Returns the Qdrant client.
Returns
QdrantClient
Qdrant client
Implementation of
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:83
collectionExists()
collectionExists(
collectionName
):Promise
<boolean
>
Checks if the collection exists in Qdrant and creates it if not.
Parameters
• collectionName: string
Qdrant collection name
Returns
Promise
<boolean
>
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:106
createCollection()
createCollection(
collectionName
,vectorSize
):Promise
<void
>
Creates a collection in Qdrant.
Parameters
• collectionName: string
Qdrant collection name
• vectorSize: number
Dimensionality of the vectors
Returns
Promise
<void
>
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:92
delete()
delete(
refDocId
):Promise
<void
>
Deletes the given nodes from the vector store.
Parameters
• refDocId: string
Node ID
Returns
Promise
<void
>
Implementation of
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:207
initializeCollection()
initializeCollection(
vectorSize
):Promise
<void
>
Initializes the collection in Qdrant.
Parameters
• vectorSize: number
Dimensionality of the vectors
Returns
Promise
<void
>
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:119
parseToQueryResult()
private
parseToQueryResult(response
):VectorStoreQueryResult
Converts the result of a query to a VectorStoreQueryResult.
Parameters
• response: QuerySearchResult
[]
Query response
Returns
VectorStoreQueryResult
Source
packages/core/src/storage/vectorStore/QdrantVectorStore.ts:229
query()
query(
query
,options
?):Promise
<VectorStoreQueryResult
>
Queries the vector store for the closest matching data to the query embeddings.
Parameters
• query: VectorStoreQuery
The VectorStoreQuery to be used
• options?: any
Required by VectorStore interface. Currently ignored.
Returns
Promise
<VectorStoreQueryResult
>
Zero or more Document instances with data from the vector store.