Search
Typesense

Typesense Search

The Typesense Integration in BuildShip allows users to leverage Typesense for their searching and indexing needs with a low-code visual experience. Typesense is a fast, scalable, and developer-friendly open-source search engine for building high-performance search experiences in your apps and products.


Typesense

With BuildShip's Typesense Nodes, users can connect to their Typesense Cloud deployment or their own Typesense instances (easily modify the node logic according to your requirements) effortlessly. This integration empowers users to create APIs, Scheduled Jobs, and other backend workflows related to search and indexing operations without extensive coding requirements.

The Typesense Nodes in BuildShip provide a no-code solution for interacting with Typesense, enabling users to leverage its powerful search capabilities within their workflows seamlessly. Whether you need to index data, perform searches, or manage collections, the Typesense Nodes offer a straightforward and user-friendly approach.

Prerequisites ✅

Before you can start using the Typesense Nodes in BuildShip, ensure that you have the following prerequisites in place:

Typesense Instance or Typesense Cloud Account

You'll need access to a Typesense instance or a Typesense Cloud account. If you're using Typesense Cloud, follow these steps:

  • Go to Typesense Cloud (opens in a new tab) and create an account if you don't have one already.
  • Create a new cluster (this process may take 4-6 minutes, after which you'll be able to generate your API keys).
  • Click on the "Generate API Keys" button to download a file containing your API keys.
Typesense

API Keys

Depending on your use case, you'll need to provide different API keys for authentication. Refer to the Typesense documentation (opens in a new tab) to learn more about which API key to use for different operations.

Host

The Node mentioned on your Typesense Dashboard is your host. This value will be used as an input to the Typesense nodes in BuildShip.

Create Collection

The "Create Collection" node allows you to create a new collection in your Typesense instance. A collection is a logical grouping of documents that share the same schema. You can use this node to create a new collection and define its schema.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance. This should be provided as a secret.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name you want to give to the new collection.
  • Schema Fields: The schema fields for the new collection, provided as a JSON array. Each field should specify a name and a type (e.g., string, int32, geopoint, etc.).

EXAMPLE INPUT

[
  { "name": "title", "type": "string" },
  { "name": "body", "type": "string" },
  { "name": "author", "type": "string" },
  { "name": "tags", "type": "string[]", "facet": true },
  { "name": "published_at", "type": "int32", "optional": true, "sortable": true }
]
💡

You can use the "Create Collection" node when you need to set up a new collection in your Typesense instance to store and search data. For example, if you're building an application that deals with location-based data, you might create a collection called "places" with fields like "title", "points", and "location" (a geopoint type).

Output

The node returns an object with the following properties:

{
  "success": boolean,
  "collection": {
    "enable_nested_fields": boolean,
    "token_separators": array,
    "num_documents": number,
    "name": string,
    "created_at": number,
    "symbols_to_index": array,
    "default_sorting_field": string,
    "fields": [
      {
        "name": string,
        "index": boolean,
        "optional": boolean,
        "infix": boolean,
        "sort": boolean,
        "locale": string,
        "type": string,
        "facet": boolean
      }
    ]
  }
}

The success property indicates whether the collection was created successfully or not. The collection object contains various properties related to the created collection, such as its name, creation timestamp, default sorting field, schema fields, and other configuration details.

Add Document

The "Add Document" node allows you to create or insert a new document into an existing Typesense collection.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance. This should be provided as a secret.
  • Host: The host address of your Typesense instance or cluster. This can be provided as a secret.
  • Collection Name: The name of the Typesense collection where you want to insert the document.
  • Document: The document object that you want to insert into the collection. This should follow the schema defined for the collection.

EXAMPLE INPUT

{
  "id": "1",
  "name": "Jon Snow",
  "email": "jonsnow@gmail.com"
}
💡

You can use the "Add Document" node whenever you need to insert new data into a Typesense collection. For example, if you have a collection called "users" with fields like "id", "name", and "email", you can use this node to add a new user document with the provided details.

Output

The node returns an object with the following properties:

{ "success": boolean, "document": { "id": string // Other properties of the inserted document } }

The success property indicates whether the document was added successfully or not. The document object contains the id of the inserted document.

Add Documents

The "Add Documents" node allows you to insert multiple documents into an existing Typesense collection in a single operation.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection where you want to insert the documents.
  • Documents: An array of document objects that you want to insert into the collection. Each document should follow the schema defined for the collection.

EXAMPLE INPUT

[
  {
    "id": "3",
    "name": "Sansa Stark",
    "email": "sansastark@gmail.com"
  },
  {
    "id": "4",
    "name": "Bran Stark",
    "email": "bran@gmail.com"
  },
  {
    "id": "5",
    "name": "Theon Greyjoy",
    "email": "theon@gmail.com"
  },
  {
    "id": "6",
    "name": "Jorah Mormont",
    "email": "jorah@gmail.com"
  }
]
💡

You can use the "Add Documents" node when you need to insert multiple documents into a Typesense collection in a single operation. This can be useful when you have a batch of data that needs to be indexed or when you want to populate a collection with initial data.

Output

The node returns an object with the following properties:

{
  "success": boolean,
  "documents": [
    {
      "id": string
    }
  ]
}

The success property indicates whether the documents were added successfully or not. The documents array contains the id of each inserted document.

Get Document

The "Get Document" node allows you to retrieve a specific document from a Typesense collection by its unique identifier (ID).

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection from which you want to retrieve the document.
  • Document ID: The unique identifier (ID) of the document you want to retrieve.
💡

You can use the "Get Document" node when you need to fetch a specific document from a Typesense collection based on its ID. This can be useful when you want to retrieve and display detailed information about a particular document or perform further operations on it.

Output

The node returns an object with the following properties:

 
{ "success": boolean, "document": object }
 

The success property indicates whether the document was retrieved successfully or not. The document object contains the full document data as retrieved from the Typesense collection.

Update Document

The "Update Document" node allows you to update an existing document in a Typesense collection by providing the document's ID and the updated field values.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance. This should be provided as a secret
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection in which you want to update the document.
  • Document ID: The unique identifier (ID) of the document you want to update.
  • Data: An object containing the updated field values for the document. This should follow the schema defined for the collection.

EXAMPLE INPUT

{
  "name": "Bran Stark",
  "email": "bran@gmail.com",
  "id": "5"
}
💡

You can use the "Update Document" node when you need to modify the data of an existing document in a Typesense collection. This can be useful when you want to update user information, product details, or any other data stored in the collection.

Output

The node returns an object with the following properties:

{ "success": boolean, "document": object }

The success property indicates whether the document was updated successfully or not. The document object contains the updated document data as stored in the Typesense collection.

Delete Document

The "Delete Document" node allows you to delete a specific document from a Typesense collection by providing its unique identifier (ID).

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection from which you want to delete the document.
  • Document ID: The unique identifier (ID) of the document you want to delete.
💡

You can use the "Delete Document" node when you need to remove a specific document from a Typesense collection. This can be useful when you want to delete outdated or irrelevant data, or when a user requests the deletion of their information from your application.

Output

The node returns an object with the following properties:

{ "success": boolean }

The success property indicates whether the document was deleted successfully or not. If the deletion is successful, no further output is provided.

Full Text Search

The "Full Text Search" node allows you to perform full-text searches on a Typesense collection, enabling you to find documents that match a specific search query.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection on which you want to perform the search.
  • Query: The search query string that you want to use for finding matching documents.
  • Field: The specific field in the collection's schema on which you want to perform the search.
  • Sort By: (Optional) The field by which you want to sort the search results.
  • Filter By: (Optional) Additional filters to apply to the search results.
💡

You can use the "Full Text Search" node when you need to search for documents in a Typesense collection based on a specific query. This can be useful in various scenarios, such as implementing a search functionality in your application, finding relevant data based on user input, or filtering data based on specific criteria.

Output

The node returns an object with the following properties:

{
  "success": boolean,
  "searchResults": {
    "hits": [
      {
        "document": object
      }
    ],
    "found": number,
    "page": number,
    "out_of": number
  }
}

The success property indicates whether the search was performed successfully or not. The searchResults object contains the following properties:

  • hits: An array of objects, each representing a document that matched the search query. The document property contains the full document data.
  • found: The total number of documents that matched the search query.
  • page: The page number of the search results.
  • out_of: The total number of pages available for the search results.

Geo Search

The "Geo Search" node allows you to perform geographic searches on a Typesense collection, enabling you to find documents within a specified radius of a given location.

💡
Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection on which you want to perform the geo search.
  • Search Query: The search query string that you want to use for finding matching documents (* matches all documents).
  • Location: The geographic coordinates (latitude and longitude) around which you want to search for documents (Eg: 48.90615915923891, 2.3435897727061175).
  • Radius: The radius (in kilometers) within which you want to search for documents.
  • Sort By: (Optional) The field by which you want to sort the search results.
💡

You can use the "Geo Search" node when you need to search for documents in a Typesense collection based on their geographic location. This can be useful in various scenarios, such as finding nearby places, events, or businesses based on the user's current location, or filtering data based on geographic criteria.

Output

The node returns an object with the following properties:

{ "success": boolean, "searchResults": { "hits": [ { "document": object } ], "found": number, "page": number, "out_of":
number } }

The success property indicates whether the search was performed successfully or not. The searchResults object contains the following properties:

  • hits: An array of objects, each representing a document that matched the search query and fell within the specified geographic radius. The document property contains the full document data.
  • found: The total number of documents that matched the search query and fell within the specified geographic radius.
  • page: The page number of the search results.
  • out_of: The total number of pages available for the search results.

Vector Search

The "Vector Search" node allows you to perform vector-based searches on a Typesense collection, enabling you to find documents that are semantically similar to a given vector representation.

Typesense

Inputs

  • API Key: The API key required for authentication with your Typesense instance.
  • Host: The host address of your Typesense instance or cluster.
  • Collection Name: The name of the Typesense collection on which you want to perform the vector search.
  • Search Query: The search query string that you want to use for finding matching documents (* matches all documents).
  • Vector Field: The field in the collection's schema that contains the vector data.
  • Vector: The vector representation for which you want to find semantically similar documents. This should be provided as a JavaScript array expression.
  • K: The number of nearest neighbors to return.
  • Sort By: (Optional) The field by which you want to sort the search results.
💡

You can use the "Vector Search" node when you need to search for documents in a Typesense collection based on their semantic similarity to a given vector representation. This can be useful in various scenarios, such as finding similar documents based on textual content, recommending related products or content, or clustering data based on semantic similarities.

Output

The node returns an object with the following properties:

{
  "success": boolean,
  "searchResults": {
    "hits": [
      {
        "document": object
      }
    ],
    "found": number,
    "page": number,
    "out_of": number
  }
}

The success property indicates whether the search was performed successfully or not. The searchResults object contains the following properties:

  • hits: An array of objects, each representing a document that is semantically similar to the provided vector. The document property contains the full document data.
  • found: The total number of documents that are semantically similar to the provided vector.
  • page: The page number of the search results.
  • out_of: The total number of pages available for the search results.
💡

Typesense supports vector-based searches, which allow you to find documents that are semantically similar to a given vector representation. This can be particularly useful for natural language processing and semantic search applications. You can refer to the Typesense documentation on vector search (opens in a new tab) for more information and examples.

Need Help?

  • 💬
    Join BuildShip Community

    An active and large community of no-code / low-code builders. Ask questions, share feedback, showcase your project and connect with other BuildShip enthusiasts.

  • 🙋
    Hire a BuildShip Expert

    Need personalized help to build your product fast? Browse and hire from a range of independent freelancers, agencies and builders - all well versed with BuildShip.

  • 🛟
    Send a Support Request

    Got a specific question on your workflows / project or want to report a bug? Send a us a request using the "Support" button directly from your BuildShip Dashboard.

  • ⭐️
    Feature Request

    Something missing in BuildShip for you? Share on the #FeatureRequest channel on Discord. Also browse and cast your votes on other feature requests.