Couchbase icon

Couchbase

Couchbase node to insert, update, retrieve, and delete data from a Couchbase database using KV, Query and Search services

Actions7

Overview

This node integrates with a Couchbase database to perform various operations including document management, querying, and full-text search. Specifically, the Search - Create Index operation allows users to create or update a full-text search index in Couchbase by providing a JSON definition of the index. This is useful for enabling advanced search capabilities on your Couchbase data.

Common scenarios include:

  • Setting up new search indexes to enable text search on specific fields.
  • Modifying existing search indexes to optimize search performance or change indexed fields.
  • Automating index creation as part of deployment or data pipeline workflows.

For example, you might define an index that indexes user profile documents by name and email fields to allow fast searching across those attributes.

Properties

Name Meaning
Index Definition The JSON object defining the search index configuration according to Couchbase Search documentation. This includes fields, analyzers, source bucket, and other index settings.

Output

The output JSON contains a single message indicating the result of the index creation operation:

[
  {
    "message": "Index created successfully"
  }
]

No binary data is produced by this operation.

Dependencies

  • Requires a valid connection to a Couchbase cluster with appropriate permissions to manage search indexes.
  • Needs an API key credential or equivalent authentication configured in n8n to connect securely to Couchbase.
  • The node uses the official Couchbase Node.js SDK internally.
  • The user must ensure the Couchbase cluster supports full-text search and that the provided index definition complies with Couchbase's Search service schema.

Troubleshooting

  • Permission errors: If the node throws errors about access or permissions, verify that the credentials used have rights to create or modify search indexes on the target cluster.
  • Invalid index definition: Errors may occur if the JSON index definition is malformed or does not conform to Couchbase Search specifications. Validate the JSON against Couchbase documentation before use.
  • Connection issues: Ensure network connectivity to the Couchbase cluster and that the cluster address and credentials are correct.
  • Empty or missing index definition: The node requires a non-empty JSON object for the index definition; supplying empty or invalid JSON will cause failures.

Links and References

Discussion