The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
Setup
In order to communicate with MongoDB, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup block, or you can create a Connection from
the Integration Settings
page and reference the whole setup as setup: ${connection.<my-connection-id>}.
The filter to update documents, please refer to the documentations. If empty then all documents will be returned.
Update (required)
update-data
object
The updated data to be applied to the documents.
Output
Field ID
Type
Description
Status
status
string
Update status.
Delete
Perform a delete operation
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_DELETE
Database Name (required)
database-name
string
The name of the database in MongoDB.
Collection Name (required)
collection-name
string
The name of the collection in MongoDB.
ID
id
string
The ID of the document.
Filter
filter
object
The filter to delete documents, please refer to the documentations. If empty then all documents will be returned.
Output
Field ID
Type
Description
Status
status
string
Delete status.
Drop Collection
Delete the collection
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_DROP_COLLECTION
Database Name (required)
database-name
string
The name of the database in MongoDB.
Collection Name (required)
collection-name
string
The name of the collection in MongoDB.
Output
Field ID
Type
Description
Status
status
string
Delete collection status.
Drop Database
Delete the database
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_DROP_DATABASE
Database Name (required)
database-name
string
The name of the database in MongoDB.
Output
Field ID
Type
Description
Status
status
string
Delete database status.
Create Search Index
Create a search index, only works for M10 or larger clusters
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_CREATE_SEARCH_INDEX
Database Name (required)
database-name
string
The name of the database in MongoDB.
Collection Name (required)
collection-name
string
The name of the collection in MongoDB.
Index Name (required)
index-name
string
The name of the index to be created.
Index Type (required)
index-type
string
The type of the index to be created. Enum values
search
vectorSearch
Syntax (required)
syntax
object
The syntax structure of the search index, please refer to the MongoDB documentation for more information. search here. vectorSearch here.
Output
Field ID
Type
Description
Status
status
string
Create index status.
Drop Search Index
Drop a search index, only works for M10 or larger clusters
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_DROP_SEARCH_INDEX
Database Name (required)
database-name
string
The name of the database in MongoDB.
Collection Name (required)
collection-name
string
The name of the collection in MongoDB.
Index Name (required)
index-name
string
The name of the index to be dropped.
Output
Field ID
Type
Description
Status
status
string
Delete index status.
Vector Search
Perform a vector search operation
Input
Field ID
Type
Description
Task ID (required)
task
string
TASK_VECTOR_SEARCH
Database Name (required)
database-name
string
The name of the database in MongoDB.
Collection Name (required)
collection-name
string
The name of the collection in MongoDB.
Index Name (required)
index-name
string
The name of the index to be used for vector search.
Query Vector (required)
query-vector
array[number]
The query vector to be used for vector search.
Exact
exact
boolean
The exact value for vector search. If true, then ENN search will be performed, otherwise ANN search will be performed. Default to false.
Limit (required)
limit
integer
Limit the documents to be returned.
Number of Candidates
num-candidates
integer
The number of candidates to the field to be used for vector search. Default to 3 times limit.
Path (required)
path
string
The path to the field to be used for vector search.
Filter
filter
object
The filter to be used for vector search, need to first create filter vectorSearch search index, please refer to the documentations. If empty then all documents will be returned to be used for vector search.
Fields
fields
array[string]
The fields to return in the documents. If empty then all fields will be returned.