CouchbaseVectorList
List vector documents with optional filters for user, conversation, and metadata.
Syntax
couchbaseVectorList(
cacheName,
[userId],
[conversationId],
[metadata],
[limit],
[offset]
)Parameters
cacheName
String
Yes
-
Name of the cache configuration
userId
String
No
-
Filter by user ID
conversationId
String
No
-
Filter by conversation ID
metadata
Struct
No
-
Filter by metadata fields
limit
Number
No
100
Maximum number of results
offset
Number
No
0
Number of results to skip (pagination)
Returns
Returns an array of vector document structs, ordered by createdAt DESC. Each struct contains:
id- Document IDtype- Document type ("vector_document")text- Text contentembedding- Vector embedding arraymetadata- Custom metadatauserId- User ID (if set)conversationId- Conversation ID (if set)createdAt- Creation timestampupdatedAt- Last update timestamp
Examples
List All Documents
List by User
List by Conversation
Filter by Metadata
Combined Filters
Pagination
List User's Recent Documents
List by Category
Get Conversation Participants
List with Statistics
Export User Data
Cleanup Old Documents
Build Document Index
Notes
Default ordering - Results are ordered by
createdAt DESC(newest first)Limit default - Default limit is 100 documents
AND filters - All specified filters must match (not OR)
Metadata matching - All specified metadata fields must match exactly
Case sensitivity - userId, conversationId, and metadata values are case-sensitive
Performance - Use limit and offset for large result sets
Pagination Pattern
Use Cases
📝 User dashboards - Show user's documents
💬 Conversation history - Display chat messages
🗂️ Category browsing - List documents by category
🔍 Content management - Browse and manage documents
📊 Analytics - Analyze document metadata and patterns
🗑️ Cleanup - Find and delete old documents
Related Functions
couchbaseVectorAdd - Store vector documents
couchbaseVectorGet - Get specific document
couchbaseVectorDelete - Delete documents
couchbaseVectorSearch - Semantic search
couchbaseQuery - Complex queries
See Also
Last updated
Was this helpful?
