跳到主要内容
版本:v2.0.0-zh

TypeSense

ToolJet can connect to your TypeSense deployment to read and write data.

Connection

Please make sure the host/IP of the TypeSense deployment is accessible from your VPC if you have self-hosted ToolJet. If you are using ToolJet cloud, please whitelist our IP.

ToolJet requires the following to connect to your TypeSense deployment:

  • Host
  • Port
  • API Key
  • Protocol
typesense connect

Querying TypeSense

Click on + button of the query manager at the bottom panel of the editor and select the TypeSense added in the previous step as the data source.
Select the operation that you want to perform on your TypeSense cluster and click Create to save the query.

typesense query
提示

Query results can be transformed using transformations. Read our transformations documentation to see how: link

Supported operations

1. Create a Collection

With this operation you can easily create Collections in your TypeSense cluster. In the schema field, you'll need to define the schema for creating a new collection. Check out TypeSense docs to know more about collections here

typesense collection

2. Index a document

Use this operation to index a document to your collection. You'll need to specify the Collection Name where you want your document to be indexed and also provide the document data according the schema defined in the collection. Read more about Indexing a document in TypeSense here.

typesense index

Use this operation to perform a search within the specified collection. Know more about the search parameters in the TypeSense doc here.

typesense search

4. Get a document

Use this operation to fetch an individual document in a collection by providing the id of the document. Read more about it here.

typesense get

5. Update a document

Use this operation to update an individual document by providing the Collection Name and Id of the document. You'll need to provide the updated document data in the form of specified schema. Check out the TypeSense's doc on updating a document here.

typesense update

6. Delete a document

Delete a document from collection by providing the Id of the document. Check out the TypeSense's doc on deleting documents here.

typesense delete
提示

Make sure that you supply JSON strings instead of JavaScript objects for any document or schema that is being passed to the server, in any of the above operations.