Procedures
Automation procedures in the OpenSearch BDK Book.
Make sure to add the OpenSearch BDK Book to your agent before using these automation procedures.
to create a (document) in opensearch
Create a document in opensearch
Input Concepts
index name
The name of the index.
text
Yes
(no default)
document
The document to be indexed.
json
Yes
(no default)
document id
The optional ID for the document.
text
No
(no default)
Output Concepts
Examples
create a document in opensearch
create a json
use the above as the document
the document's "title" is "My New Document"
create the document in opensearch
the index name is "my_index"
create a document in opensearch with a specific id
create a json
use the above as the document
the document's "title" is "My New Document"
create the document in opensearch
the index name is "my_index"
the document id is "my-custom-id"
to delete a document from opensearch
Delete a document from opensearch
Input Concepts
Examples
get a document from opensearch
the document id is "my-document-id"
delete the document from opensearch
to get a (document) from opensearch
Get a document from opensearch by its ID
Input Concepts
index name
The name of the index.
text
Yes
(no default)
document id
The ID of the document to retrieve.
text
Yes
(no default)
Output Concepts
Examples
get an document from opensearch
get a document from opensearch
the index name is "my_index"
the document id is "my-document-id"
to query some (documents) from opensearch
Query documents from Opensearch
Input Concepts
index name
single index name, or comma separated index or aliases to search on.
text
Yes
(no default)
query type
the type of query to perform
enum[fuzzy, match, prefix, simple, term]
No
{'class_name': 'QueryType', 'name': 'MATCH', 'value': 'match'}
Output Concepts
Examples
query some documents from opensearch
query some documents from opensearch
the index name is "my_index"
query some documents from opensearch with filter expression
query some documents from opensearch whose title is "Mulholland Drive"
the index name is "movies"
the filter expression is "title:Mulholland Drive"
query some documents from opensearch with filter expression and fuzzy query type
query some documents from opensearch whose title is "Mulholland Drive"
the index name is "movies"
the filter expression is "title:Mulholland Drive"
the query type is "FUZZY"
the limit is 10
the offset is 0
to update a (document) in opensearch
Update a document in opensearch
Input Concepts
Output Concepts
Examples
get a document from opensearch
the document id is "my-document-id"
the document's source's name is "John"
update the document in opensearch
the document id is "my-document-id"
Last updated
Was this helpful?