This is the implementation of the Couchbase Vector store data handler for MindsDB. Couchbase is an open-source, distributed multi-model NoSQL document-oriented database software package optimized for interactive applications. These applications may serve many concurrent users by creating, storing, retrieving, aggregating, manipulating, and presenting data.Documentation Index
Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect Couchbase to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to Couchbase.
Implementation
In order to make use of this handler and connect to a Couchbase server in MindsDB, the following syntax can be used. Note, that the example uses the defaulttravel-sample bucket which can be enabled from the couchbase UI with pre-defined scope and documents.
couchbase library, the Python driver for Couchbase.
The required arguments to establish a connection are as follows:
connection_string: the connection string for the endpoint of the Couchbase serverbucket: the bucket name to use when connecting with the Couchbase serveruser: the user to authenticate with the Couchbase serverpassword: the password to authenticate the user with the Couchbase serverscope: scopes are a level of data organization within a bucket. If omitted, will default to_default
Usage
Now, you can use the established connection to create a collection (or table in the context of MindsDB) in Couchbase and insert data into it:Creating tables
Now, you can use the established connection to create a collection (or table in the context of MindsDB) in Couchbase and insert data into it:mysql_datasource is another MindsDB data source that has been created by connecting to a MySQL database. The test_embeddings table in the mysql_datasource data source contains the embeddings that we want to store in Couchbase.Querying and searching
You can query your collection (table) as shown below:Deleting records
You can delete documents usingDELETE just like in SQL.