Elasticsearch

The Elasticsearch component is a data component that allows users to access the Elasticsearch database. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component configuration is defined and maintained here.

#Setup

FieldField IDTypeNote
Cloud ID (required)cloud-idstringFill in the Cloud ID for the Elasticsearch instance
API Key (required)api-keystringFill in the API key for the Elasticsearch instance (please use encoded one)

#Supported Tasks

Search for documents in Elasticsearch, support full text search

InputIDTypeDescription
Task ID (required)taskstringTASK_SEARCH
Index Name (required)index-namestringName of the Elasticsearch index
IDidstringThe ID of the document
QueryquerystringFull text search query for search task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected
FilterfilterobjectThe query dsl filter which starts with "query" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html
Filter SQLfilter-sqlstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter
SizesizeintegerNumber of documents to return. If empty then all documents will be returned
Fieldsfieldsarray[string]The fields to return in the documents. If empty then all fields will be returned
Minimum Scoremin-scorenumberMinimum score to consider for search results. If empty then no minimum score will be considered
OutputIDTypeDescription
StatusstatusstringSearch operation status
ResultresultobjectResult of the search operation

Search for vector similarity search in Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_VECTOR_SEARCH
Index Name (required)index-namestringName of the Elasticsearch index
Field (required)fieldstringField name of the vector to search for similar vectors
Query Vectorquery-vectorarray[number]Query vector to search for similar vectors
KkintegerK of documents to do kNN vector search
Num Candidatesnum-candidatesintegerNumber of candidates to be considered for kNN vector search. Default to 2 times of k
FilterfilterobjectThe query dsl filter which starts with "filter" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#knn-search-filter-example
Filter SQLfilter-sqlstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter
Fieldsfieldsarray[string]The fields to return in the documents. If empty then all fields will be returned
Minimum Scoremin-scorenumberMinimum score to consider for search results. If empty then no minimum score will be considered
OutputIDTypeDescription
StatusstatusstringSearch operation status
ResultresultobjectResult of the vector search operation

#Index

Index a document into Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_INDEX
Index Name (required)index-namestringName of the Elasticsearch index
IDidstringThe ID of the document
Data (required)dataobjectData to be indexed
OutputIDTypeDescription
StatusstatusstringIndex operation status

#Multi Index

Index multiple documents into Elasticsearch with bulk API

InputIDTypeDescription
Task ID (required)taskstringTASK_MULTI_INDEX
Index Name (required)index-namestringName of the Elasticsearch index
Array IDarray-idarray[string]The array of id
Array Data (required)array-dataarray[object]Array data to be indexed
OutputIDTypeDescription
StatusstatusstringIndex operation status

#Update

Update a document in Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_UPDATE
Index Name (required)index-namestringName of the Elasticsearch index
IDidstringThe ID of the document
QueryquerystringFull text search query for update task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected
FilterfilterobjectThe query dsl filter which starts with "query" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html
Filter SQLfilter-sqlstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter
Update (required)update-dataobjectUpdate data
OutputIDTypeDescription
StatusstatusstringUpdate operation status

#Delete

Delete documents from Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE
Index Name (required)index-namestringName of the Elasticsearch index
IDidstringThe ID of the document
QueryquerystringFull text search query for delete task, query will be prioritised over filter if both are provided, if both query and filter are not provided, all documents will be selected
FilterfilterobjectThe query dsl filter which starts with "query" field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/query-filter-context.html
Filter SQLfilter-sqlstringThe filter to be applied to the data with SQL syntax, which starts with WHERE clause, empty for no filter
OutputIDTypeDescription
StatusstatusstringDelete operation status

#Create Index

Create an index in Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_CREATE_INDEX
Index Name (required)index-namestringName of the Elasticsearch index
MappingsmappingsobjectIndex mappings which starts with {"mappings":{"properties"}} field, please refer to https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html for vector search and https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html for other mappings
OutputIDTypeDescription
StatusstatusstringCreate index operation status

#Delete Index

Delete an index in Elasticsearch

InputIDTypeDescription
Task ID (required)taskstringTASK_DELETE_INDEX
Index Name (required)index-namestringName of the Elasticsearch index
OutputIDTypeDescription
StatusstatusstringDelete index operation status