Name of the database to use
Whether the metadata is contained in a single column or multiple columns
Type declaration for filter type
Name of the main table to store vectors and documents
Adds documents to the vector store.
The documents to add.
A promise that resolves when the documents have been added.
Adds vectors to the vector store.
The vectors to add.
The documents associated with the vectors.
A promise that resolves with the IDs of the added vectors when the vectors have been added.
Performs a full-text search on the vector store and returns the top 'k' similar documents.
The query string to search for
The options for the full-text search, including: - kfts: The number of full-text search results to return - filter: Optional filters to apply to narrow down the search results - metadataItems: Optional metadata fields to include in the results
A promise that resolves with the full-text search results when the search is complete.
Performs a hybrid search on the vector store and returns the top 'k' similar documents.
The query string to search for
A promise that resolves with the hybrid search results when the search is complete.
Performs a similarity search on the vector store and returns the top 'k' similar documents.
The query string.
The options for the similarity search, including: - kvector: The number of vector search results to return - filter: Optional filters to apply to the search - metadataItems: Optional metadata fields to include in results
A promise that resolves with the similarity search results when the search is complete.
Protected
convert2Converts a query to a FTS query.
The user query
The converted FTS query
Deletes documents from the vector store.
The IDs of the documents to delete.
A promise that resolves when the documents have been deleted.
Sets up the database and tables.
The setup options:
A promise that resolves when the database and tables have been set up.
Performs a similarity search on the vector store and returns the top 'similarityK' similar documents.
The vector to search for.
The number of documents to return.
Optional
filter: AzionFilter[]Optional filters to apply to the search.
Optional
metadataItems: string[]Optional metadata items to include in the search.
A promise that resolves with the similarity search results when the search is complete.
Static
initializeCreates a new vector store instance and sets up the database.
The embeddings interface to use for vectorizing documents
Configuration options:
Interface for the arguments required to initialize an Azion library.
Optional
expandedMetadata?: booleanOptional
filter?: AzionFilter[]Database setup options:
Additional columns to create in the table beyond the required ones. If expandedMetadata is true, this is required.
The search mode to enable: - "vector": Only vector similarity search capabilities - "hybrid": Both vector and full-text search capabilities
A promise that resolves with the configured vector store instance
Example usage: