Skip to main content
Couchbase is an award-winning distributed NoSQL cloud database that delivers unmatched versatility, performance, scalability, and financial value for all of your cloud, mobile, AI, and edge computing applications. This guide shows how to use load documents from couchbase database.

Installation

npm

Usage

Querying for Documents from Couchbase

For more details on connecting to a Couchbase cluster, please check the Node.js SDK documentation. For help with querying for documents using SQL++ (SQL for JSON), please check the documentation.

Connect to Couchbase Cluster

Create the Loader

Load Documents

You can fetch the documents by calling the load method of the loader. It will return a list with all the documents. If you want to avoid this blocking call, you can call lazy_load method that returns an Iterator.

Specifying Fields with Content and Metadata

The fields that are part of the Document content can be specified using the pageContentFields parameter. The metadata fields for the Document can be specified using the metadataFields parameter.

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.